|
Home > Archive > SQL Anywhere database > July 2005 > Re: Odd 'last request time'
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Odd 'last request time'
|
|
| Breck Carter [TeamSybase] 2005-07-11, 1:23 pm |
| Has your server been running for a long time?
I have noticed a certain "drift" in CONNECTION_PROPERTY (
'LASTREQTIME' ) after the server has been up for a long time (weeks
rather than days).
Run this a few times in dbisql and watch the drift_ms values change:
SELECT CURRENT TIMESTAMP AS dt1,
CAST ( CONNECTION_PROPERTY ( 'LASTREQTIME' )
AS TIMESTAMP ) AS dt2,
DATEDIFF ( MILLISECOND, dt1, dt2 ) AS drift_ms,
PROPERTY ( 'StartTime' ) server_started_at;
With a freshly-started server, drift_milliseconds will be in the range
+-100 which is probably just acceptable error in the method shown
above.
With an long-running server, I have seen this grow quite a bit larger
(e.g., 6000) for 8.0.2 and 9.0.1. I can't check 9.0.2 right now
because everything where I am now was restarted on Saturday.
Breck
On 11 Jul 2005 03:07:07 -0700, "John Davey"
<john. davey@automationpart
nership.com> wrote:
>SQLAnywhere server v9.0.2.2551 on Windows XP
>
>I am trying to diagnose some odd application behaviour, but in doing so I
>have noticed something a little odd about what the ASA server is reporting
>about my active connections. The attached text file shows that the
>'lastrequesttime' reported for some of the active connections is actually
>ahead of the current time (as reported in the same query by 'current
>timestamp'). Is this behaviour familiar to anyone? Any suggestions about
>what is going on? I can't at the moment see any reason why this would be
>causing the application problems I am trying to understand, but it doesn't
>help in my 'detective work' to not really know which connections are
>recently active.
>
>
>Thanks,
>
>John Davey
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| John Davey 2005-07-12, 3:23 am |
| Breck,
yes, exactly what I am seeing - on a server running for just under four days
the drift is 16 minutes (just under 1,000,000ms) - the lastrequesttime is
reported to be 16 minutes IN ADVANCE of the current time! This seems to be
orders of magnitude worse than what you report.
Do you have any suspicions about what is going on? Do you have any reason to
think there are adverse consequences of this drift?
Regards,
John
"Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
message news:mrc5d1t6kmd07di
01vunpmi5ucnq2l58t8@
4ax.com...
> Has your server been running for a long time?
>
> I have noticed a certain "drift" in CONNECTION_PROPERTY (
> 'LASTREQTIME' ) after the server has been up for a long time (weeks
> rather than days).
>
> Run this a few times in dbisql and watch the drift_ms values change:
>
> SELECT CURRENT TIMESTAMP AS dt1,
> CAST ( CONNECTION_PROPERTY ( 'LASTREQTIME' )
> AS TIMESTAMP ) AS dt2,
> DATEDIFF ( MILLISECOND, dt1, dt2 ) AS drift_ms,
> PROPERTY ( 'StartTime' ) server_started_at;
>
> With a freshly-started server, drift_milliseconds will be in the range
> +-100 which is probably just acceptable error in the method shown
> above.
>
> With an long-running server, I have seen this grow quite a bit larger
> (e.g., 6000) for 8.0.2 and 9.0.1. I can't check 9.0.2 right now
> because everything where I am now was restarted on Saturday.
>
> Breck
>
> On 11 Jul 2005 03:07:07 -0700, "John Davey"
> <john. davey@automationpart
nership.com> wrote:
>
reporting[color=dark
red]
doesn't[color=darkre
d]
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
http://www.amazon.com/exec/obidos/A...7/risingroad-20
> bcarter@risingroad.com
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
| |
| Breck Carter [TeamSybase] 2005-07-12, 9:23 am |
| How fast is your CPU? My very small sample set indicates the faster
the CPU, the smaller the drift... your numbers indicate you might not
be *quite* at the state of CPU art (no offense intended :)
As far as I know it affects CONNECTION_PROPERTY,
sa_conn_info and
request level logging. IMO is benign as far as data integrity, server
execution, etcetera, is concerned but is a minor irritation when it
comes to monitoring and the like.
I *think* the message below implies it will go away in the next
release, but the symptom discussed is different.
Perhaps Bruce can clarify :)
Breck
=====
From: "Bruce Hay" <hay at sybase dot com>
Newsgroups: sybase.public.sqlanywhere.general
Subject: Re: Source of LastReqTime in sa_conn_info?
Date: 18 Jun 2004 08:23:17 -0700
The LastReqTime connection property is computed based on the start
time of
the server and the length of time since the server was started. If the
system clock is adjusted while the server is running, LastReqTime will
not
reflect the change.
The next major release of ASA will include a change to the way this
value is
computed, so that LastReqTime will more closely match the system time.
=====
On 12 Jul 2005 01:34:20 -0700, "John Davey"
<john. davey@automationpart
nership.com> wrote:
>Breck,
>
>yes, exactly what I am seeing - on a server running for just under four days
>the drift is 16 minutes (just under 1,000,000ms) - the lastrequesttime is
>reported to be 16 minutes IN ADVANCE of the current time! This seems to be
>orders of magnitude worse than what you report.
>
>Do you have any suspicions about what is going on? Do you have any reason to
>think there are adverse consequences of this drift?
>
>Regards,
>
>John
>
>"Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
>message news:mrc5d1t6kmd07di
01vunpmi5ucnq2l58t8@
4ax.com...
>reporting
>doesn't
>http://www.amazon.com/exec/obidos/A...7/risingroad-20
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
|
|
|
|
|