the mystery of the missing mysql.sock file

the mystery of the missing mysql.sock file

am 15.12.2009 16:46:04 von bmurphy

--0015174bdcc8a44bdd047ac64990
Content-Type: text/plain; charset=ISO-8859-1

Take one perfectly functional production server running 5.0.77. It has been
up and running under load for quite some time. I am using xtrabackup for
backups and suddenly three or four days ago backup stop running.

Investigation shows that the socket file '/tmp/mysql.sock' is no longer
there. The mysql server itself is still functioning .. you can specify
--host=localhost instead of --socket=/tmp/mysql.sock so the mysql client
uses tcp/ip instead of the socket file to connect to the server.


- Permissions did not change on the /tmp directory..I checked.
- There are no errors in the .err log.
- No cron jobs clearing out /tmp.
- SHOW VARIABLES LIKE '%sock%' displays the proper socket location



Any thoughts? I have seen this type of thing occasionally before, but never
taken the time to really investigate. I would just restart the server. I
will end up having to do so in this case, but I would really like to find
out WHY this happened. Is this is bug in the server code? I can't come up
with any other explanation. I would love for this to be explainable!

thanks,

keith

--
Chief Training Officer
Paragon Consulting Services
850-637-3877

--0015174bdcc8a44bdd047ac64990--

Re: the mystery of the missing mysql.sock file

am 15.12.2009 17:00:34 von Johan De Meersman

--0015176f13b67d8631047ac67dd3
Content-Type: text/plain; charset=ISO-8859-1

Presumably someone deleted it :-) You can try an 'lsof -U |grep mysql' to
see if any processes still have it open. If the mysqld process still has it
open, it's probably not the server.

Why do you keep it in /tmp, btw ? My guess would be that someone (or some
process) decided it was time to clean /tmp out.

On Tue, Dec 15, 2009 at 4:46 PM, Keith Murphy wrote:

> Take one perfectly functional production server running 5.0.77. It has been
> up and running under load for quite some time. I am using xtrabackup for
> backups and suddenly three or four days ago backup stop running.
>
> Investigation shows that the socket file '/tmp/mysql.sock' is no longer
> there. The mysql server itself is still functioning .. you can specify
> --host=localhost instead of --socket=/tmp/mysql.sock so the mysql client
> uses tcp/ip instead of the socket file to connect to the server.
>
>
> - Permissions did not change on the /tmp directory..I checked.
> - There are no errors in the .err log.
> - No cron jobs clearing out /tmp.
> - SHOW VARIABLES LIKE '%sock%' displays the proper socket location
>
>
>
> Any thoughts? I have seen this type of thing occasionally before, but never
> taken the time to really investigate. I would just restart the server. I
> will end up having to do so in this case, but I would really like to find
> out WHY this happened. Is this is bug in the server code? I can't come up
> with any other explanation. I would love for this to be explainable!
>
> thanks,
>
> keith
>
> --
> Chief Training Officer
> Paragon Consulting Services
> 850-637-3877
>

--0015176f13b67d8631047ac67dd3--

Re: the mystery of the missing mysql.sock file

am 15.12.2009 17:42:17 von bmurphy

--001517479428b08a12047ac71216
Content-Type: text/plain; charset=ISO-8859-1

Thanks Johan. Yes, it shows the mysqld holding it open. Not suprising really
I guess. I did check the cron jobs and the history file searching for
something/someone who deleted it, but didn't find anything. Still, that is
what it looks like happend. I will move the sock file to /var/run/mysql so
it is out of the way.

thanks,

keith

On Tue, Dec 15, 2009 at 11:00 AM, Johan De Meersman wrote:

> Presumably someone deleted it :-) You can try an 'lsof -U |grep mysql' to
> see if any processes still have it open. If the mysqld process still has it
> open, it's probably not the server.
>
> Why do you keep it in /tmp, btw ? My guess would be that someone (or some
> process) decided it was time to clean /tmp out.
>
>
> On Tue, Dec 15, 2009 at 4:46 PM, Keith Murphy wrote:
>
>> Take one perfectly functional production server running 5.0.77. It has
>> been
>> up and running under load for quite some time. I am using xtrabackup for
>> backups and suddenly three or four days ago backup stop running.
>>
>> Investigation shows that the socket file '/tmp/mysql.sock' is no longer
>> there. The mysql server itself is still functioning .. you can specify
>> --host=localhost instead of --socket=/tmp/mysql.sock so the mysql client
>> uses tcp/ip instead of the socket file to connect to the server.
>>
>>
>> - Permissions did not change on the /tmp directory..I checked.
>> - There are no errors in the .err log.
>> - No cron jobs clearing out /tmp.
>> - SHOW VARIABLES LIKE '%sock%' displays the proper socket location
>>
>>
>>
>> Any thoughts? I have seen this type of thing occasionally before, but
>> never
>> taken the time to really investigate. I would just restart the server. I
>> will end up having to do so in this case, but I would really like to find
>> out WHY this happened. Is this is bug in the server code? I can't come up
>> with any other explanation. I would love for this to be explainable!
>>
>> thanks,
>>
>> keith
>>
>> --
>> Chief Training Officer
>> Paragon Consulting Services
>> 850-637-3877
>>
>
>


--
Chief Training Officer
Paragon Consulting Services
850-637-3877

--001517479428b08a12047ac71216--