Sybase ASE – Exhausted “cpu grace time” when Loading Database Dump

Sometimes your load statement can abruptly terminate with following message:-

ASE is terminating this process.

If you try to bring the DB online following error message is received:-

CT-LIBRARY error:
ct_send(): network packet layer: internal Client Library error: State error: trying to write when connection is expecting a read.
CT-LIBRARY error:
ct_cancel(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect

And the error log has following message:-

kernel  timeslice error: spid 29 exhausted its 'time slice' of 100 milliseconds and additional 'cpu grace time' of 500 ticks (50000 milliseconds). It has been marked for termination

To resolve the issue we need to increase the limit for “cpu grace time” parameter using the sp_configure procedure.

“cpu_grace_time” together with time slice, specifies the maximum amount of time that a user process can run without yielding the CPU before Adaptive Server preempts it and terminates it with a timeslice error. The units for cpu grace time are time ticks, as defined by sql server clock tick length. The default value of cpu_grace_time parameter is 500, it can be adjusted accordingly:-

exec sp_configure 'cpu grace time', 4999
go

One thought on “Sybase ASE – Exhausted “cpu grace time” when Loading Database Dump

  1. Pingback: Sybase ASE | Oracle Database Internal Mechanism

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.