467,200 Members | 1,009 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

DB2-PHP Memory problem

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
  • viewed: 1512
Share:
1 Reply
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.

Similar topics

reply views Thread by richardshen@canada.com | last post: by
5 posts views Thread by Hassan Naqvi | last post: by
138 posts views Thread by Ian Boyd | last post: by
1 post views Thread by Massimiliano Campagnoli | last post: by
3 posts views Thread by Anoop | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.