List:General Discussion« Previous MessageNext Message »
From:Andy Wallace Date:June 27 2013 4:18pm
Subject:Re: NOW() is stuck...
View as plain text  
Problem is that I don't set the timestamp variable anywhere (except yesterday as
a test to try and fix the problem). This is stuff that has been working correctly
for many months. We had some network/dns and load issues over the last couple of
days, and the mysql clock is frozen at:


mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2013-06-26 02:27:14 |
+---------------------+

While the machine/system date is:

$ date
Thu Jun 27 09:15:25 PDT 2013


I had actually planned to restart the mysql instance on this server last night, but there
was a miscommunication, and that will have to wait for tonight.

Once suggestion I got was to explicitly set the global timezone value, but can't do that
because we didn't load the timezone tables.

Guess we have to wait for tonight.

thanks, guys

Andy



On 6/26/13 6:34 PM, Eric Bergen wrote:
> This is the expected behavior if you set the timestamp variable in
> your session. This is the same mechanism that replication uses to
> execute transactions on the slave with the correct time. Setting
> timestamp back to default or reopening your connection will fix it.
>
> MariaDB [(none)]> set timestamp=1372296737;
> Query OK, 0 rows affected (0.00 sec)
>
> MariaDB [(none)]> select now(); select sleep(5); select now();
> +---------------------+
> | now()               |
> +---------------------+
> | 2013-06-26 21:32:17 |
> +---------------------+
> 1 row in set (0.00 sec)
>
> +----------+
> | sleep(5) |
> +----------+
> |        0 |
> +----------+
> 1 row in set (5.00 sec)
>
> +---------------------+
> | now()               |
> +---------------------+
> | 2013-06-26 21:32:17 |
> +---------------------+
> 1 row in set (0.00 sec)
>
> MariaDB [(none)]> set timestamp=default;
> Query OK, 0 rows affected (0.00 sec)
>
> MariaDB [(none)]> select now();
> +---------------------+
> | now()               |
> +---------------------+
> | 2013-06-26 21:33:53 |
> +---------------------+
> 1 row in set (0.00 sec)
>
> MariaDB [(none)]> select now();
> +---------------------+
> | now()               |
> +---------------------+
> | 2013-06-26 21:33:54 |
> +---------------------+
> 1 row in set (0.00 sec)
>
> On Wed, Jun 26, 2013 at 4:18 PM, John Meyer
> <johnmeyer@stripped> wrote:
>> Well, if you want to get unstuck in time, maybe you need to call Billy
>> Pilgrim ;-)
>>
>> Andy Wallace wrote:
>>>
>>> We've been having some issues with one of our MySQL servers lately, and
>>> currently
>>> the dang thing is "stuck". For at least the last hour, NOW() is returning
>>> the same
>>> value:
>>>
>>> mysql> select now();
>>> +---------------------+
>>> | now()               |
>>> +---------------------+
>>> | 2013-06-26 02:27:14 |
>>> +---------------------+
>>>
>>> The system variable "timestamp" also has that same time value stored in
>>> it. How
>>> can we kick this loose so that the values are more current with real time?
>>> (it is
>>> currently 3:08PM here, despite our MySQL instance thinking it's 2am. The
>>> system
>>> time on the machine is correct:
>>>
>>> $ date
>>> Wed Jun 26 15:08:56 PDT 2013
>>>
>>>
>>> This is MySQL 5.1.46 running on solaris2.10.
>>>
>>> Any ideas short of restarting the MySQL engine? I'm willing to do that,
>>> but would much
>>> rather wait and not do it in the middle of the day.
>>>
>>> Thanks,
>>> Andy
>>>
>>>
>>
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:    http://lists.mysql.com/mysql
>>
>
>
>

-- 
Andy Wallace
iHOUSEweb, Inc.
awallace@stripped
(866) 645-7700 ext 219
--
"Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week
debugging Monday's code."
- Christopher Thompson
Thread
NOW() is stuck...Andy Wallace26 Jun
  • RE: NOW() is stuck...Rick James26 Jun
  • Re: NOW() is stuck...John Meyer26 Jun
    • Re: NOW() is stuck...Eric Bergen27 Jun
      • Re: NOW() is stuck...Andy Wallace27 Jun
        • Re: NOW() is stuck...Nick Khamis27 Jun
          • Re: NOW() is stuck...Andy Wallace27 Jun
  • Re: NOW() is stuck...Benjamin Stillman27 Jun
    • Re: NOW() is stuck...Andy Wallace27 Jun
      • Re: NOW() is stuck...Benjamin Stillman27 Jun
        • Re: NOW() is stuck...Andy Wallace27 Jun
          • Re: NOW() is stuck...Eric Bergen27 Jun
            • Re: NOW() is stuck...Andy Wallace27 Jun
          • Re: NOW() is stuck...Claudio Nanni27 Jun
            • Re: NOW() is stuck...Andy Wallace27 Jun
          • Re: NOW() is stuck...walter harms28 Jun
            • Re: NOW() is stuck...Andy Wallace28 Jun
              • Re: NOW() is stuck...Claudio Nanni28 Jun
Re: NOW() is stuck...Johan De Meersman27 Jun