Paged Pool memory Increase

Hi,

I have a PHP web site based on Yii Framework, having both MySQL and MsSql DB connections.

The server is Microsoft’s ISS 6.0, and i have tried both using php 5.2.7 and 5.3.8.

The problem is, the server’s paged pool memory is constantly increasing, based on the traffic of the web site as long as i have observed. The server’s paged pool memory increases from 50-60Mb to around 300*350Mbs approx and then after a while the system crashed since no paged pool memory can be allocated.

The logs of the web site gives errors for being unable to open source .php files or connections (ex errors: not enough space, could not locate/open file, could not open connection vs.)

I know there is a way to tell the server to start trimming paged pool memory (default value when it reaches to 80% of max PPM) earlier, but i need to know what is probably leaking paged pool memory (as it ever increases i believe there is a leak).

I have tried using poolmon.exe to determine the leak but it had no help (Strg tag is consuming and seems to be leaking memory, but i could not lead to anywhere from that info.)

All my DB connections are closed properly in the code (don’t really know if it has anything to do with my problem).

In the task manager, all php-cgi.exe processes (their number can be up to 20*25 based on the traffic), uses at most around 150Kb Paged pool memory.

I have used different values for php memory limit, iis max instances, max connections variables. Nothing helped.

I believe there is a problem in the coding, may be regarding the connections to DB servers or ASP.NET servers (used as game or chat motors, by use of web services).

I will be very glad if anyone has faced with a similar problem, or can help with what reasons can lead to a leak in Paged pool memory of the server for a php based web site.

Thanks.

Can

This is really just a wild guess but do you have any long running yii shell commands? They store all the logging and tracing info in cache as long as they are running which can become a problem when they start logging like mad for some reason (increasing traffic maybe)

Greetings,

Haensel

I don’t believe i do, but I’m also not very sure. Can you give example commands that may be running like you say.

I mean a console application like described in http://www.yiiframework.com/doc/guide/1.1/en/topics.console

Maybe you created your own console commands to do some background work (I use this to reindex some database entries here and then). As I said I am just guessing but I had a memory problem using a long running script.

Er, did you write the app or not?

The whole affair smells fishy. :)

What exactly are you doing, and how?

What’s up with those ‘manually closed db connections’ ?

How much of your code is Yii, and how much is raw PHP?

Well I just wanted make sure what he meant.

There are no shell commands / background console app running.

It’s a gaming web site. For user information, connects to Mysql and MsSql servers with Yii’s cDbConnection.

For gaming and chat purposes, connects to IIS servers on different machines with Web Services, mostly created with either fopen or using Soap.

Other than that, it’s a regular php web site. Most of the code is based on Yii, with some raw php coding.

I would probably start looking at the raw PHP - because there’s not known memory corruption issues with Yii (AFAIK).

That would be the place to start.

Did you use webgrind or other profiling/debugging tool?