You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vasiliy Boulytchev <va...@linuxspecial.com> on 2006/05/18 21:01:31 UTC
[users@httpd] Apache,php to mysql problem
Ladies and Gents,
Thank you so much for your patience, I will describe my problem in as
much detail as I can...
Diagram:
Internet
X
XXXXX mysql server
X
LVS Load Balancer
x x
X X
X X
OH1 OH2
Problem:
Apache 2.2 on Server OH2, just stopped connecting to the mysql5
databases on mysql server. Pages just time out.
For now, things are OK, since I disabled web requests going to OH2 in
the load balancer, however, this problem needs to be addressed quickly :)
Things I have tried:
1.) I am able to connect to mysql server via command line... such as
mysql -H mysqlserver -u username -p databasename -P 3307
2.) I did tcpdumps from both ends, and packets are arriving at both
destinations. I am able to verify that packet streams look alike. I
turned on the bad server for a second in LVS, tcpdumped a sample stream,
saved it, reloaded LVS, and captured a good connection attempt.
3.) I am able to ping the mysql server from OH2, i am able to telnet to
port 3307, so I have pretty much established that the problem is not
network connectivity. I have also looked over iptables just for grins.
Nothing useful is being logged to the apache logs :(
PLEASE HELP!
THANKS!
--
Vasiliy Boulytchev
CIT Internet
www.citinternet.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache,php to mysql problem
Posted by Mike Jackson <mj...@mightymerchant.com>.
> All the configs are shared across NFS. So config files are the same on
> both OH1 and OH2...
>
> the applications connect to mysql via php connect strings, and as tcpdump
> reveals are doing the proper things
You might try using strace on an Apache process on OH2 and see if you can
spot anything amiss. Also, you might throw some debugging lines into your
PHP code to spit out some breakpoint-like messages. I've had good luck with
a custom error handler and trigger_error(). My error handler emails me as
much diagnostic info as possible (including the contents of the errcontext
array). With PHP5, I've also used file_put_contents() to write debug output
to a file. That's perhaps not very safe, but while testing it's been very
helpful.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache,php to mysql problem
Posted by Vasiliy Boulytchev <va...@linuxspecial.com>.
All the configs are shared across NFS. So config files are the same on
both OH1 and OH2...
the applications connect to mysql via php connect strings, and as
tcpdump reveals are doing the proper things
THANKS
Vasiliy Boulytchev
CIT Internet
www.citinternet.com
Luc I. Suryo wrote:
>
> sorry to be a pain, but this a BAD design!
> the db should has been in a dmz behind the webservers..
>
> anyway: i would suggest to check whatever your mysql db was not hacked
> and the acl altered...
>
> how does the web server connects to the db app-wise? (perl/php)
> if php set full php debug (via your php.ini)
>
> not much... but a start
>
> -ls
>
>> Diagram:
>>
>>
>> Internet
>> X
>> XXXXX mysql server
>> X
>> LVS Load Balancer
>> x x
>> X X
>> X X
>> OH1 OH2
>>
>>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Apache,php to mysql problem
Posted by Vic Feria <da...@comcast.net>.
In your mysql setting increase the time-out period. With your application,
include a timing cycle that pings the server every certain time less than
the timeout period. That should remind MySQL server that you are still there
and "alive".
Note this part of the MySQL Manual:
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
-----Original Message-----
From: Vasiliy Boulytchev [mailto:vasiliy@linuxspecial.com]
Sent: Thursday, May 18, 2006 2:02 PM
To: users@httpd.apache.org
Subject: [users@httpd] Apache,php to mysql problem
Ladies and Gents,
Thank you so much for your patience, I will describe my problem in
as
much detail as I can...
Diagram:
Internet
X
XXXXX mysql server
X
LVS Load Balancer
x x
X X
X X
OH1 OH2
Problem:
Apache 2.2 on Server OH2, just stopped connecting to the mysql5
databases on mysql server. Pages just time out.
For now, things are OK, since I disabled web requests going to OH2
in
the load balancer, however, this problem needs to be addressed quickly :)
Things I have tried:
1.) I am able to connect to mysql server via command line...
such as
mysql -H mysqlserver -u username -p databasename -P 3307
2.) I did tcpdumps from both ends, and packets are arriving at
both
destinations. I am able to verify that packet streams look alike. I
turned on the bad server for a second in LVS, tcpdumped a sample stream,
saved it, reloaded LVS, and captured a good connection attempt.
3.) I am able to ping the mysql server from OH2, i am able to
telnet to
port 3307, so I have pretty much established that the problem is not
network connectivity. I have also looked over iptables just for grins.
Nothing useful is being logged to the apache logs :(
PLEASE HELP!
THANKS!
--
Vasiliy Boulytchev
CIT Internet
www.citinternet.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info. To
unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/342 - Release Date: 5/17/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/342 - Release Date: 5/17/2006
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org