FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-09-2008, 12:49 PM
Erek Dyskant
 
Default Help, PHP/Mysql connections are so slow.

On Mon, 2008-06-09 at 04:28 -0700, Pro Green European wrote:
> Delays in the connection to the db server is still around 20-30
> seconds.
>

It sounds like the MySQL server is configured to do reverse DNS lookups
on incoming connections, and those DNS lookups are timing out. For
small systems (a few web servers and a db server) I tend to add the web
servers to the system's hosts file, so the mysql server doesn't have to
do a DNS lookup for every connection.

Have you checked that the nameservers in resolv.conf on the MySQL server
are reachable?

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-09-2008, 01:35 PM
Pro Green European
 
Default Help, PHP/Mysql connections are so slow.

Thank you for all your time and replies

I solved the problem by switching to RHEL 5.2 x86_64 on the same server. Now PHP/Mysql is working properly.

Strange thing though, every setting is identical to that of the CentOS 5.1 x86_64 install.


Regards,
/mysteron


--- On Mon, 6/9/08, Kai Schaetzl <maillists@conactive.com> wrote:

> From: Kai Schaetzl <maillists@conactive.com>
> Subject: Re: [CentOS] Help, PHP/Mysql connections are so slow.
> To: centos@centos.org
> Date: Monday, June 9, 2008, 2:51 PM
> Pro Green European wrote on Mon, 9 Jun 2008 03:37:33 -0700
> (PDT):
>
> > I also have the same identical site accessing the same
> database on
> > the same mysql server, running on a CentOS4 server
> without any problem.
>
> How did you move the database? You moved from PHP4 to 5 and
> from MySQL4 to
> 5. You *have* to expect problems.
>
> > I'm starting to wonder if this is a broken
> hardware issue...
>
> I think what you have not done yet, is test a simple PHP
> page with a
> simple SQL query to a *different* simple, new database with
> just a few
> data.
>
> BTW: the mysqladmin list of connections can show the
> current connection
> status of queries, the statement etc. and thus help in
> debugging. The same
> list can be obtained from within PHPMyadmin.
>
> Kai
>
> --
> Kai Schätzl, Berlin, Germany
> Get your web at Conactive Internet Services:
> http://www.conactive.com
>
>
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-09-2008, 01:43 PM
Max Hetrick
 
Default Help, PHP/Mysql connections are so slow.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pro Green European wrote:
> Thank you for all your time and replies
>
> I solved the problem by switching to RHEL 5.2 x86_64 on the same server. Now PHP/Mysql is working properly.
>
> Strange thing though, every setting is identical to that of the CentOS 5.1 x86_64 install.


I recall reading something about there being a bug with InnoDB and
causing 20-30 second queries with mysql 5.0.22. The solution, I think,
was to upgrade to at least MySQL 5.0.30.

What version is RHEL 5.2 running?

I believe this is the bug:

<http://bugs.mysql.com/bug.php?id=15815>

Regards,
Max




- --
# find . "*imbecile" -exec sed -ie "s/stupidity/commonsense/g" '{}' ;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFITTNvIXSX/6LmsXkRAoaSAJ9Hc4nWUbee4+dl/JZY900k/Lr3LQCgmrqo
xbfNxQAPRNVblX6apgMdu5U=
=R9MY
-----END PGP SIGNATURE-----
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-09-2008, 02:41 PM
Ralph Angenendt
 
Default Help, PHP/Mysql connections are so slow.

Max Hetrick wrote:
> What version is RHEL 5.2 running?

5.0.45 AFAICS.

Ralph
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-09-2008, 02:53 PM
Max Hetrick
 
Default Help, PHP/Mysql connections are so slow.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralph Angenendt wrote:

> 5.0.45 AFAICS.


That would answer the upgrade to at least 5.0.30 part. Thanks, Ralph.

Regards,
Max


- --
# find . "*imbecile" -exec sed -ie "s/stupidity/commonsense/g" '{}' ;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFITUPjIXSX/6LmsXkRAiHSAJ4xMxyz9vCYgnuddPw+GBksNFFBSgCfeKyW
QiG+FsSrNL99jpik+cLmeeU=
=xwr5
-----END PGP SIGNATURE-----
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-09-2008, 10:13 PM
Karanbir Singh
 
Default Help, PHP/Mysql connections are so slow.

Erek Dyskant wrote:

It sounds like the MySQL server is configured to do reverse DNS lookups
on incoming connections, and those DNS lookups are timing out. For
small systems (a few web servers and a db server) I tend to add the web
servers to the system's hosts file, so the mysql server doesn't have to
do a DNS lookup for every connection.


mysqld always does reverse lookup by default. to change that, you need
the 'skip-name-resolve' option in the [mysqld] section of your config
file ( usually /etc/my.cnf and make sure there is no
/var/lig/mysql/my.cnf )



--
Karanbir Singh : http://www.karan.org/ : 2522219@icq
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-10-2008, 12:58 AM
Jun Salen
 
Default Help, PHP/Mysql connections are so slow.

>>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.

My suggestion is just for the test and see if it will improve, try to update from RPMForge both your apache, php and mysql one at a time then test. I believe Dag's repo has more recent version.

Thanks,

junji
aisalen.wordpress.com
Linux Registered User #253162
CentOS User


Send instant messages to your online friends http://uk.messenger.yahoo.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 04:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org