[CentOS] Help, PHP/Mysql connections are so slow.
Pro Green European
pro_green_european at yahoo.com
Mon Jun 9 06:42:54 UTC 2008
I've got a new Centos 5.1 x86-64 server that uses PHP to
communicate with MySQL5. On this server, PHP/Mysql connections are dead
slow and unresponsive. It takes sometimes up to a minute to list tables
in phpmyadmin for example.
I've verified on the server that the
issue has to be PHP/Mysql related. If I use a CGI based Mysql admin
tool, communication is fast and there are no delays.
The server is Xeon based and has 4GB of RAM.
SElinux is enabled, and ModSecurity for Apache too. Disabling these two does not help.
SElinux allows Apache to network connect.
Some php.ini settings:
safe_mode = On
max_execution_time = 60
max_input_time = 60
memory_limit = 128M
open_basedir is active, and there are no conflicts.
disable_functions also contain several functions in order to secure server.
allow_fopen_url is disabled
Could there be a bug somewhere that is causing this slowness for PHP/Mysql connections.
Feedback and tips for solving this problem will be greatly appreciated :)
/PGE (aka mysteron)
Link to forum post:
Answer I've recieved and answered:
Q: Sounds like the server is trying to do a reverse DNS lookup and timing
out after a minute plus. Is DNS set up on the server correctly?
A: Yes, DNS is working correctly. I tried with the IP address of the
database server instead of its DNS name, but there is no difference,
PHP/Mysql connections are still dead slow.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentOS