[CentOS] Help, PHP/Mysql connections are so slow.
Pro Green European
pro_green_european at yahoo.com
Mon Jun 9 07:14:21 UTC 2008
Now I've also tried running a MySQL server on the webserver, and setting for example phpmyadmin to connect to localhost does not change any kind of behaviour. PHP/Mysql connections are still very slow.
--- On Mon, 6/9/08, Pro Green European <pro_green_european at yahoo.com> wrote:
From: Pro Green European <pro_green_european at yahoo.com>
Subject: [CentOS] Help, PHP/Mysql connections are so slow.
To: centos at centos.org
Date: Monday, June 9, 2008, 9:42 AM
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
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.
CentOS mailing list
CentOS at centos.org
More information about the CentOS