Mailing List Archive

Request with Cancel in Browser to Oracle DataBase
Hello,

I have a request that execute a query to Oracle Database,
all work fine.

But if user cancel the request in browser the httpd daemon
running embperl don't free a memory.

I'm tested this problem with solaris and linux intel redhat 6.1.

Any idea ?

Thanks in advance
----------------------------------------

Ouput of /usr/proc/pmap in solaris machine :

649: /usr/local/apache/bin/httpd
00010000 1232K read/exec /usr/local/apache/bin/httpd
00152000 64K read/write/exec /usr/local/apache/bin/httpd
00162000 184200K read/write/exec [ heap ]
EE402000 8K read/write/exec [ anon ]
EE504000 8K read/write/exec [ anon ]
EE606000 8K read/write/exec [ anon ]
EE708000 8K read/write/exec [ anon ]
EE80A000 8K read/write/exec [ anon ]
EE90C000 8K read/write/exec [ anon ]
EEA0E000 8K read/write/exec [ anon ]
EEB0C000 8K read/write/exec [ anon ]
EEB10000 8K read/write/exec [ anon ]
EEC0E000 8K read/write/exec [ anon ]
EEE40000 112K read/exec /usr/local/lib/perl5/5.00503/sun4-solaris/auto/POSIX/POSIX.so
EEE6A000 16K read/write/exec /usr/local/lib/perl5/5.00503/sun4-solaris/auto/POSIX/POSIX.so
EEF82000 8K read/write/exec [ anon ]
EEFA0000 88K read/exec /usr/lib/libthread.so.1
EEFC4000 16K read/write/exec /usr/lib/libthread.so.1
EEFC8000 32K read/write/exec [ anon ]
EEFE0000 24K read/exec /usr/lib/libaio.so.1
EEFF4000 8K read/write/exec /usr/lib/libaio.so.1
EEFF6000 8K read/write/exec [ anon ]
EF000000 4528K read/exec /home/oracle/lib/libclntsh.so.1.0
EF47A000 136K read/write/exec /home/oracle/lib/libclntsh.so.1.0
EF49C000 64K read/write/exec [ anon ]
EF4B0000 128K read/exec /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Oracle/Oracle.so
EF4DE000 16K read/write/exec /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Oracle/Oracle.so
EF4F0000 72K read/exec /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBI/DBI.so
EF510000 16K read/write/exec /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBI/DBI.so
EF520000 24K read/exec /usr/local/lib/perl5/5.00503/sun4-solaris/auto/Data/Dumper/Dumper.so
EF534000 16K read/write/exec /usr/local/lib/perl5/5.00503/sun4-solaris/auto/Data/Dumper/Dumper.so
EF540000 152K read/exec /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Embperl/Embperl.so
EF574000 16K read/write/exec /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Embperl/Embperl.so
EF578000 8K read/write/exec [ anon ]
EF580000 592K read/exec /usr/lib/libc.so.1
EF622000 32K read/write/exec /usr/lib/libc.so.1
EF630000 8K read/write/exec [ anon ]
EF640000 8K read/write/exec [ anon ]
EF650000 16K read/exec /usr/lib/nss_files.so.1
EF662000 8K read/write/exec /usr/lib/nss_files.so.1
EF670000 48K read/write/shared [ anon ]
EF680000 448K read/exec /usr/lib/libnsl.so.1
EF6FE000 40K read/write/exec /usr/lib/libnsl.so.1
EF708000 24K read/write/exec [ anon ]
EF720000 16K read/exec /usr/platform/sun4u/lib/libc_psr.so.1
EF730000 16K read/exec /usr/lib/libmp.so.2
EF742000 8K read/write/exec /usr/lib/libmp.so.2
EF750000 88K read/exec /usr/lib/libm.so.1
EF774000 8K read/write/exec /usr/lib/libm.so.1
EF780000 8K read/write/exec/shared [ anon ]
EF790000 32K read/exec /usr/lib/libsocket.so.1
EF7A6000 8K read/write/exec /usr/lib/libsocket.so.1
EF7A8000 8K read/write/exec [ anon ]
EF7B0000 8K read/exec /usr/lib/libdl.so.1
EF7C0000 8K read/write/exec [ anon ]
EF7D0000 112K read/exec /usr/lib/ld.so.1
EF7FA000 8K read/write/exec /usr/lib/ld.so.1
EFFF4000 48K read/write/exec [ stack ]
total 192664K

http://www.chilewap.cl/"]
Re: Request with Cancel in Browser to Oracle DataBase [ In reply to ]
Hello,
>
> I have a request that execute a query to Oracle Database,
> all work fine.
>
> But if user cancel the request in browser the httpd daemon
> running embperl don't free a memory.
>
> I'm tested this problem with solaris and linux intel redhat
6.1.
>

Is the memory freed if the request is not canceled?

Do you get the same behaviour without the database query?

Gerald
Re: Request with Cancel in Browser to Oracle DataBase [ In reply to ]
At 08:54 PM 8/9/2000 +0200, Gerald Richter wrote:
Hello,
>
> I have a request that execute a query to Oracle Database,
> all work fine.
>
> But if user cancel the request in browser the httpd daemon
> running embperl don't free a memory.
>
> I'm tested this problem with solaris and linux intel redhat
6.1.
>

Is the memory freed if the request is not canceled?

Yes ....


Do you get the same behaviour without the database query?

No ... only with a long query that user cancel from Browser .....

The Browser stop transaction but httpd continue work ....

Bye



http://www.chilewap.cl/"]
Re: Request with Cancel in Browser to Oracle DataBase [ In reply to ]
> Is the memory freed if the request is not canceled?
>
> Yes ....
>
> Do you get the same behaviour without the database query?
>
> No ... only with a long query that user cancel from Browser .....
>
> The Browser stop transaction but httpd continue work ....
>

Yes, the httpd can't know that the transaction is stop, it only realize it
when you write something to the browser (which in normal EmbperlSetup
happens only at the end of the request).

Would be interesting to see what the differnce in these two processing steps
is. Maybe you can turn on Embperl logging (log as much as possible) and
compare the two logfile, to see if there is a difference.

Gerald



> Bye
>
>
>
> --------------------------------------------------------------------------
------
>
>
> --------------------------------------------------------------------------
------
>
>
Re: Request with Cancel in Browser to Oracle DataBase [ In reply to ]
Hi,

I try to use $req_rec->connection->aborted() for abort the
long request if user press stop. But it always return 0 .....

Exist any report of memory leaks ? ,with :

Apache/1.3.12
mod_perl/1.24
DBI 1.4
DBD::Oracle 1.06

thanks in advance ....



At 06:21 AM 8/10/2000 +0200, Gerald Richter wrote:
> Is the memory freed if the request is not canceled?
>
> Yes ....
>
> Do you get the same behaviour without the database query?
>
> No ... only with a long query that user cancel from Browser .....
>
> The Browser stop transaction but httpd continue work ....
>

Yes, the httpd can't know that the transaction is stop, it only realize it
when you write something to the browser (which in normal EmbperlSetup
happens only at the end of the request).

Would be interesting to see what the differnce in these two processing steps
is. Maybe you can turn on Embperl logging (log as much as possible) and
compare the two logfile, to see if there is a difference.

Gerald







> Bye
>
>
>
> --------------------------------------------------------------------------
------
>
>
> --------------------------------------------------------------------------
------
>
>


http://www.chilewap.cl/"]
Re: Request with Cancel in Browser to Oracle DataBase [ In reply to ]
Hi,
>
> I try to use $req_rec->connection->aborted() for abort the
> long request if user press stop. But it always return 0 .....
>

As I already wrote, Apache will not recognize that the connection is aborted
until you write anything to the client. Unless you have set
optEarlyHttpHeader, Embperl doesn't send anything before the end of the
request

> Exist any report of memory leaks ? ,with :
>
> Apache/1.3.12
> mod_perl/1.24
> DBI 1.4
> DBD::Oracle 1.06
>

I don't think that there are any for those four, but I have heard of some
inside the Oracle client libs, but I may wrong. Also I don't know which
version and so on.

Is it possible that some global will stay around? You can use Apache::Status
to view the content of all your globals (for the current child; maybe runing
in single child mode -X)


Gerald


> thanks in advance ....
>
>
>
> At 06:21 AM 8/10/2000 +0200, Gerald Richter wrote:
>
> > Is the memory freed if the request is not canceled?
> >
> > Yes ....
> >
> > Do you get the same behaviour without the database query?
> >
> > No ... only with a long query that user cancel from Browser .....
> >
> > The Browser stop transaction but httpd continue work ....
> >
>
> Yes, the httpd can't know that the transaction is stop, it only realize
it
> when you write something to the browser (which in normal EmbperlSetup
> happens only at the end of the request).
>
> Would be interesting to see what the differnce in these two processing
steps
> is. Maybe you can turn on Embperl logging (log as much as possible) and
> compare the two logfile, to see if there is a difference.
>
> Gerald
>
>
>
>
>
>
>
>
>
> > Bye
> >
> >
> >
>


> --------------------------------------------------------------------------
> ------
> >
> >
>


> --------------------------------------------------------------------------
> ------
> >
> >
>
>
> --------------------------------------------------------------------------
------
>
>
> --------------------------------------------------------------------------
------
>
>


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: Request with Cancel in Browser to Oracle DataBase [ In reply to ]
Hi,

I change the method of use DBI with ApacheDBI-0.87 and
all work fine ....

thanks ....

At 06:46 AM 8/11/2000 +0200, Gerald Richter wrote:
Hi,
>
> I try to use $req_rec->connection->aborted() for abort the
> long request if user press stop. But it always return 0 .....
>

As I already wrote, Apache will not recognize that the connection is aborted
until you write anything to the client. Unless you have set
optEarlyHttpHeader, Embperl doesn't send anything before the end of the
request

> Exist any report of memory leaks ? ,with :
>
> Apache/1.3.12
> mod_perl/1.24
> DBI 1.4
> DBD::Oracle 1.06
>

I don't think that there are any for those four, but I have heard of some
inside the Oracle client libs, but I may wrong. Also I don't know which
version and so on.

Is it possible that some global will stay around? You can use Apache::Status
to view the content of all your globals (for the current child; maybe runing
in single child mode -X)


Gerald


> thanks in advance ....
>
>
>
> At 06:21 AM 8/10/2000 +0200, Gerald Richter wrote:
>
> > Is the memory freed if the request is not canceled?
> >
> > Yes ....
> >
> > Do you get the same behaviour without the database query?
> >
> > No ... only with a long query that user cancel from Browser .....
> >
> > The Browser stop transaction but httpd continue work ....
> >
>
> Yes, the httpd can't know that the transaction is stop, it only realize
it
> when you write something to the browser (which in normal EmbperlSetup
> happens only at the end of the request).
>
> Would be interesting to see what the differnce in these two processing
steps
> is. Maybe you can turn on Embperl logging (log as much as possible) and
> compare the two logfile, to see if there is a difference.
>
> Gerald
>
>
>
>
>
>
>
>
>
> > Bye
> >
> >
> >
>


> --------------------------------------------------------------------------
> ------
> >
> >
>


> --------------------------------------------------------------------------
> ------
> >
> >
>
>
> --------------------------------------------------------------------------
------
>
>
> --------------------------------------------------------------------------
------
>
>


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de     /"]http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


http://www.chilewap.cl/"]