469,917 Members | 1,489 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

memory leak

Hi,

We have found a memory leak on a php server after executing a php/mysql
application. The configuration is php 4.3.1 + mysql on windows server
2000 with IIS.

Does the memory leak come from the php application itself (ie. a bug on
the php developed scripts)?

If not, where could be the problem?

Thank you in advance
Nov 22 '05 #1
14 1612

Don HO wrote:
Hi,

We have found a memory leak on a php server after executing a php/mysql
application. The configuration is php 4.3.1 + mysql on windows server
2000 with IIS.

Does the memory leak come from the php application itself (ie. a bug on
the php developed scripts)?

If not, where could be the problem?

Thank you in advance


Are you using any COM object?

Nov 22 '05 #2
Chung Leong wrote:
Don HO wrote:
Hi,

We have found a memory leak on a php server after executing a php/mysql
application. The configuration is php 4.3.1 + mysql on windows server
2000 with IIS.

Does the memory leak come from the php application itself (ie. a bug on
the php developed scripts)?

If not, where could be the problem?

Thank you in advance

Are you using any COM object?


No.
Nov 22 '05 #3

Don HO wrote:
Hi,

We have found a memory leak on a php server after executing a php/mysql
application. The configuration is php 4.3.1 + mysql on windows server
2000 with IIS.

Does the memory leak come from the php application itself (ie. a bug on
the php developed scripts)?

If not, where could be the problem?

Thank you in advance


could be the PHP app... There's not too much I can think of that would
cause a memory leak besides session variables. I could be wrong, but
that's all i can think of that would do that.

Nov 22 '05 #4
Hmmm. You will need to be more specific then. How did you notice the
leak and how fast is the system losing memory?

Nov 22 '05 #5

"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de
news:11**********************@g44g2000cwa.googlegr oups.com...
Hmmm. You will need to be more specific then. How did you notice the
leak and how fast is the system losing memory?

Hi,

In fact we use COM Object .... we do use ActiveXObject.

On the server there is scripts in php and javascript that generate ActiveX
for opening a Word application on the client poste and replace variables on
the Word document model (the model is on the client poste)

is there any memory leak probleme with ActiveXObject ?

Thank you again
Nov 22 '05 #6
Stephanie Le Gall wrote:

"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de
news:11**********************@g44g2000cwa.googlegr oups.com...
Hmmm. You will need to be more specific then. How did you notice the
leak and how fast is the system losing memory?
Hi,

In fact we use COM Object .... we do use ActiveXObject.

On the server there is scripts in php and javascript that generate ActiveX
for opening a Word application on the client poste and replace variables
on the Word document model (the model is on the client poste)

is there any memory leak probleme with ActiveXObject ?


Yes.

Using Word/Excell in that way is called 'automation'.
And while very usefull in certain situations, it is also wellknown for its
buggy behaviour.

Google for "automation memory leak"

Follow any of the 220.000 hits

In general:
1) Be sure you know WHAT you are instantiating
2) Be sure you close the all apps/objects again. Even in case of an error.

Good luck.

Regards,
Erwin Moller

Thank you again


Nov 22 '05 #7

"Erwin Moller"
<si******************************************@spam yourself.com> a écrit dans
le message de news:43***********************@news.xs4all.nl...
Stephanie Le Gall wrote:

"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de
news:11**********************@g44g2000cwa.googlegr oups.com...
Hmmm. You will need to be more specific then. How did you notice the
leak and how fast is the system losing memory?
Hi,

In fact we use COM Object .... we do use ActiveXObject.

On the server there is scripts in php and javascript that generate ActiveX for opening a Word application on the client poste and replace variables
on the Word document model (the model is on the client poste)

is there any memory leak probleme with ActiveXObject ?


Yes.

Using Word/Excell in that way is called 'automation'.
And while very usefull in certain situations, it is also wellknown for its
buggy behaviour.

Google for "automation memory leak"

Follow any of the 220.000 hits

In general:
1) Be sure you know WHAT you are instantiating
2) Be sure you close the all apps/objects again. Even in case of an error.

Good luck.

Regards,
Erwin Moller

Thank you again

Thank you ... I'm going to have a look at Google for "automation memory
leak" !!!

Have a Good day !

Nov 22 '05 #8

"Erwin Moller"
<si******************************************@spam yourself.com> a écrit dans
le message de news:43***********************@news.xs4all.nl...
Stephanie Le Gall wrote:

"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de
news:11**********************@g44g2000cwa.googlegr oups.com...
Hmmm. You will need to be more specific then. How did you notice the
leak and how fast is the system losing memory?

Hi,

In fact we use COM Object .... we do use ActiveXObject.

On the server there is scripts in php and javascript that generate ActiveX for opening a Word application on the client poste and replace variables
on the Word document model (the model is on the client poste)

is there any memory leak probleme with ActiveXObject ?


Yes.

Using Word/Excell in that way is called 'automation'.
And while very usefull in certain situations, it is also wellknown for its
buggy behaviour.

Google for "automation memory leak"

Follow any of the 220.000 hits

In general:
1) Be sure you know WHAT you are instantiating
2) Be sure you close the all apps/objects again. Even in case of an error.

Good luck.

Regards,
Erwin Moller

Thank you again


Thank you I'm going to have a look ...
But one more question .... The automation is done from ie directly on the
client poste, not on the server ... is it possible to turn down a server
this way ?

Thanks again
Nov 22 '05 #9
Stephanie Le Gall wrote:

<snip>


Thank you ... I'm going to have a look at Google for "automation memory
leak" !!!
Hee, you changed your name!
:P

Good luck.

Regards,
Erwin Moller

Have a Good day !


Nov 22 '05 #10
Stephanie Le Gall wrote:

<snip>

Thank you I'm going to have a look ...
But one more question .... The automation is done from ie directly on the
client poste, not on the server ... is it possible to turn down a server
this way ?
The automation is done in IE-'browser'??
Well, no server is involved if you do that, I expect.
So in IE you create WORD and Excell objects?
(Are you aware that every sensible websurfer turned these options off in IE
for websurfing? Or are you developing for a 'thrusted zone'?)

You claimed before you where doing it on the server.
Are you sure this time? ;-)
Me a bit confused. :P

Anyway: if your server is leaking memory, while ONLY serving HTML and
running some scipts , and no instantiating of any COM objects is performed
on the server (except the standard stuff, like databaseconnectivity), well
then I expect the memoryleak is caused by something else than IIS.
We are talking about IIS, right?

Are you sure it is IIS that is causing the leaking?
Did you see its image/memfootprint grow on the server?

I mean, if you are running M$, almost anything can be the cause of memleaks.
M$ was/is famous for that.
(A long time rule-of-thumb for M$-administrators was: reboot every night)

You might do some profiling on the server to drill down to the right process
that is causing the server to run out of mem.

(These things can be hard to pinpoint.)

Sorry I cannot be of more help.

Good luck!

Regards,
Erwin Moller

Thanks again


Nov 22 '05 #11
"Erwin Moller"
<si******************************************@spam yourself.com> a écrit dans
le message de news:43***********************@news.xs4all.nl...
Stephanie Le Gall wrote:

<snip>


Thank you ... I'm going to have a look at Google for "automation memory
leak" !!!
Hee, you changed your name!
:P


Yes, it does that when you post the message at night from your boyfriend's
PC ;o)
Then in the morning you go back to work ... ;P


Good luck.

Regards,
Erwin Moller

Have a Good day !

Nov 22 '05 #12

"Erwin Moller"
<si******************************************@spam yourself.com> a écrit dans
le message de news:43***********************@news.xs4all.nl...
Stephanie Le Gall wrote:

<snip>

Thank you I'm going to have a look ...
But one more question .... The automation is done from ie directly on the client poste, not on the server ... is it possible to turn down a server
this way ?
The automation is done in IE-'browser'??
Well, no server is involved if you do that, I expect.
So in IE you create WORD and Excell objects?
(Are you aware that every sensible websurfer turned these options off in

IE for websurfing? Or are you developing for a 'thrusted zone'?)
Yes, we have to active the Activix on ie-browser and low the security ...
but the application is on a 'thrusted zone', a secured network.

You claimed before you where doing it on the server.
Are you sure this time? ;-)
Me a bit confused. :P

Yes, I'm a bit confused myself, development is ok, but talking about servers
and technic (etc.) is not that easy ...
In fact the client access the php application via ie-browser, so the script
that generate the Activix on javascript is on the server.
This script open Word on the client PC like this :

var fin = "C:/symphonie_modeles/<?=$doc?>";
var out = "C:/symphonie/<?=make_name($doc)?>";
var word = new ActiveXObject("Word.Application");

then replace variables on the Word document on the client PC by automation
Anyway: if your server is leaking memory, while ONLY serving HTML and
running some scipts , and no instantiating of any COM objects is performed
on the server (except the standard stuff, like databaseconnectivity), well
then I expect the memoryleak is caused by something else than IIS.
We are talking about IIS, right?
Yes IIS
so as I told you previsouly the Activix script is runing on the server ...


Are you sure it is IIS that is causing the leaking?
Did you see its image/memfootprint grow on the server?

Well, I'll have to check with the server administrator to be 100% sure ...

I mean, if you are running M$, almost anything can be the cause of memleaks. M$ was/is famous for that.
(A long time rule-of-thumb for M$-administrators was: reboot every night)

What a good new ! I think I'm gonna kill myself ! ;o)

You might do some profiling on the server to drill down to the right process that is causing the server to run out of mem.

(These things can be hard to pinpoint.)
Yes, that's why I'm a little bit depresed ;o)

Do you know what can we could use to do this profiling, cause I'm not a
server administrator myself ... and the server administrator doesn't seem to
be that good (with all my respect ...)


Sorry I cannot be of more help.

Thank you anyway it helped me a lot to know that Activix and automation can
create memory leak anyway ;o)
Really thanks a lot !!! ;o)
Good luck!

Regards,
Erwin Moller

Thanks again

Nov 22 '05 #13
Multi-posting isn't looked on kindly by many people

Nov 22 '05 #14

Stephanie Le Gall wrote:
In fact we use COM Object .... we do use ActiveXObject.

On the server there is scripts in php and javascript that generate ActiveX
for opening a Word application on the client poste and replace variables on
the Word document model (the model is on the client poste)

is there any memory leak probleme with ActiveXObject ?


COM support in PHP is rather flaky. Very often objects are not freed,
even when the script ends. If you manually call the Release() method on
the objects, you might to able to free them all. It's tricky though, as
it has to be done in a particular order.

My suggestion is to set up PHP as a CGI application under a different
file extension (e.g. .phpc) and rename that one particular script to
that extension.

Nov 22 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by ranjeet.gupta | last post: by
17 posts views Thread by José Joye | last post: by
4 posts views Thread by Don Nell | last post: by
20 posts views Thread by jeevankodali | last post: by
23 posts views Thread by James | last post: by
8 posts views Thread by Adrian | last post: by
7 posts views Thread by Salvador | last post: by
3 posts views Thread by Jim Land | last post: by
7 posts views Thread by Ragnar Agustsson | last post: by
22 posts views Thread by Peter | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.