Re: [Axis2C] mod_axis2 service shutdown problem

2008-02-20 Thread Ben Wyckoff
Thanks Dumindu. I've opened an issue in Jira, and I've been looking at the
code a bit more, and I think the issue is a bit more complex. I'll move the
discussion to the dev-list.

-Ben


 From: Dumindu Pallewela [EMAIL PROTECTED]
 Date: Wed, 20 Feb 2008 11:39:58 +0530
 To: [EMAIL PROTECTED]
 Cc: Apache AXIS C Developers List [EMAIL PROTECTED], Apache AXIS C
 User List axis-c-user@ws.apache.org
 Subject: Re: [Axis2C] mod_axis2 service shutdown problem
 
 Hi Ben,
 
 On Feb 20, 2008 1:40 AM, Ben Wyckoff [EMAIL PROTECTED] wrote:
 snip
 Has anyone else run into this issue? Is anyone trying to allocate resources
 that have to be freed? (In particular, I'm opening a database, and I need to
 properly close it - I can't just rely on the OS to free memory or close file
 handles.)
 /snip
 
 This seems to be a problem with mod_axis2. Although the memory
 allocated with apr_pools will get free'd eventually without free
 functions being called, in order to free up other resources, we need
 to register relevant free functions to pool cleanup of a pool which
 has resource's lifetime. Please add a jira issue.
 
 The attached patch should solve this issue when shared memory is not
 used. I'm not sure if it works when shared memory is used. Hope that
 someone familiar with axis2c shared memory implementation will look
 further into it.
 
 Regards,
 Dumindu.
 
 -- 
 Dumindu Pallewela
 http://blog.dumindu.com
 GPG ID: 0x9E131672
 
 WSO2 | Oxygenating the Web Service Platform | http://wso2.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2C] mod_axis2 service shutdown problem

2008-02-19 Thread Ben Wyckoff
Hello,
I'm experimenting with mod_axis2 in Apache 2.2.4 on Solaris 10 (I know
Solaris isn't officially supported, but this appears to be a general apache2
issue.) I started with the echo service sample and started modifying it. I
allocate some resources at service init time (in echo_init) that I need to
free/close at service free time (in echo_free.)

If I run this in the simple axis2_http_server, echo_free gets called when I
stop the server. But when I run this in apache2, echo_free does NOT appear
to be called when I stop apache.

I've started to look at the code for mod_axis2, and I see where the call to
AXIS2_SVC_SKELETON_INIT is made, but I see no corresponding call to _FREE.
In apache2, shutdown handling is usually done via a registered pool cleanup
handler, and I don't see one of those either, but I haven't walked through
all of the axis2_worker code yet.

I've searched the bug DB and the email archive, and haven't found any
relevant references.

Has anyone else run into this issue? Is anyone trying to allocate resources
that have to be freed? (In particular, I'm opening a database, and I need to
properly close it - I can't just rely on the OS to free memory or close file
handles.)

Thanks,
-Ben Wyckoff

P.S. I see that 1.3.0 RC2 doesn't contain any changes to mod_axis2.c


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2C] mod_axis2 service shutdown problem

2008-02-19 Thread Dumindu Pallewela
Hi Ben,

On Feb 20, 2008 1:40 AM, Ben Wyckoff [EMAIL PROTECTED] wrote:
snip
 Has anyone else run into this issue? Is anyone trying to allocate resources
 that have to be freed? (In particular, I'm opening a database, and I need to
 properly close it - I can't just rely on the OS to free memory or close file
 handles.)
/snip

This seems to be a problem with mod_axis2. Although the memory
allocated with apr_pools will get free'd eventually without free
functions being called, in order to free up other resources, we need
to register relevant free functions to pool cleanup of a pool which
has resource's lifetime. Please add a jira issue.

The attached patch should solve this issue when shared memory is not
used. I'm not sure if it works when shared memory is used. Hope that
someone familiar with axis2c shared memory implementation will look
further into it.

Regards,
Dumindu.

-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | Oxygenating the Web Service Platform | http://wso2.com


mod_axis2_cleanup_diff
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]