Leonidas wrote:
I have a web portal made with PHP and DB2 running and i use Apache Web
Server.
DB2 8.1, PHP 5 and Apache 2.0.50 on Windows XP.
After some usage the system's memory increases dramatically and i
can't understand why. I read somewhere that it is a problem of PHP and
apache when they run on Windows system. Can anyone help me?
A couple of thoughts:
* What process is requesting the increased memory? You should be able to
track that through Window's Task Manager. It would be a good idea to
confirm that it is actually PHP, DB2, or Apache that's causing the
memory consumption and not some other process on your machine.
* Are you closing your database connections using odbc_close()? It's
possible that PHP might be holding ever-increasing numbers of database
connections if you're not closing your database connections. You can
track the number of connections through the DB2 Activity Monitor.
* Consider using odbc_pconnect() instead of odbc_connect() to take
advantage of PHP's pooled connection support; if you follow this route
you should specify a reasonable number of maximum connections using the
odbc.max_persistent php.ini variable.
* Have you tried using Apache 1.3.x instead of Apache 2.x? The PHP site
says almost everywhere that Apache 2.x should not be used for production
systems because not every PHP extension is guaranteed to work in a
thread-safe fashion with Apache 2.x's threading model.
Dan