Solved

PHP Fatal error:  Uncaught Exception: SQLSTATE[HY000] [2002] Cannot assign requested address in

Posted on 2016-09-29
1
151 Views
Last Modified: 2016-10-05
I'm trying to figure out what this error is that I've found in my httpd error_log file.  Sometimes the site shows as not available and tracked it down to this error in the error_log:

 PHP Fatal error:  Uncaught Exception: SQLSTATE[HY000] [2002] Cannot assign requested address in ....

I'm not sure what this means, but I see that I have about 20k open when I run this command:  netstat -anlp | grep :3306 | grep TIME_WAIT -wc

I tried shortening from 60 sec to 3 sec and no change in the connections:
echo "3" > /proc/sys/net/ipv4/tcp_fin_timeout

Is that my issue, connections are not closing out quickly enough?
0
Comment
Question by:N R
1 Comment
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 41822848
Check your code to make sure that you do not leave open connections.
Check variables to see what is the max connection ...... Allowed....

The information in your question provides no other insight,
Does your php code test for the existence of an existing connection before opening a new one?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
The viewer will learn how to dynamically set the form action using jQuery.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now