473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1761

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
17
by: José Joye | last post by:
Hi, I have implemented a Service that is responsible for getting messages from a MS MQ located on a remote machine. I'm getting memory leak from time to time (???). In some situation, it is...
4
by: Don Nell | last post by:
Hello Why is there a memory leak when this code is executed. for(;;) { ManagementScope scope = new ManagementScope(); scope.Options.Username="username"; scope.Options.Password="password";...
20
by: jeevankodali | last post by:
Hi I have an .Net application which processes thousands of Xml nodes each day and for each node I am using around 30-40 Regex matches to see if they satisfy some conditions are not. These Regex...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
8
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
7
by: Ragnar Agustsson | last post by:
Hi all I have been wandering about the best way to sandbox memory leaks in 3rd party libraries when using them from the .Net framework. I have a 3rd party library, written in C++, that leaks a...
22
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several reports at one time. My problem - there is a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.