By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,018 Members | 930 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,018 IT Pros & Developers. It's quick & easy.

DB2-PHP Memory problem

P: n/a
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?
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.