Results 1 to 5 of 5

Thread: Deadlocks

  1. #1
    Join Date
    Apr 2003
    Posts
    54

    Unanswered: Deadlocks

    Hi,
    I am using sybase 11.9.2 on linux. Two of my processes run, one being users querying our database via our website and the other process basically maintains and updates the data. Now, the first process runs 24/7 but the second one is run about once every month and both of them uses some common tables due to which I get deadlocks in the errorlog. I was wondering if I could set up job priorities in Sybase 11.9.2 so that it does not have to kill the other process. Is it possible to do something like that?????


    Regards

    Subhas

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443

    Re: Deadlocks

    Hi Subhas,

    I feel that the best way to handle this is to resolve it in the code or use locking granularity like row-level locking on the common tables. If you change the locking schemes, make sure you re-create the triggers associated with the table.

  3. #3
    Join Date
    Apr 2003
    Posts
    54
    Do you mean go from APL to DOL????? I had tried that before only to encounter serious performance hits.......

    Regards

    Subhas

  4. #4
    Join Date
    Jan 2003
    Posts
    62

    Re: Deadlocks

    I may not able to give any concrete solution.
    To answer your queston, I belive is no. Sybase deadlock policy is based on the fact that the process (involved in deadlock) with the lesser cpu time will always be imposed as the deadlock victim for eviction. At the moment, even up to the current release of ASE, there is no option to set priority for a process to be imposed as the deadlock victim.
    Hence, I guess you have to either change the way you access the table in these processes. Otherwise, try as far as possible to keep the 2nd process (which does update) short - if you can split this into smaller transaction.

    Originally posted by jaideep
    Hi,
    I am using sybase 11.9.2 on linux. Two of my processes run, one being users querying our database via our website and the other process basically maintains and updates the data. Now, the first process runs 24/7 but the second one is run about once every month and both of them uses some common tables due to which I get deadlocks in the errorlog. I was wondering if I could set up job priorities in Sybase 11.9.2 so that it does not have to kill the other process. Is it possible to do something like that?????


    Regards

    Subhas

  5. #5
    Join Date
    Apr 2003
    Posts
    54

    Re: Deadlocks

    Hi Chen,
    Thanks for replying. The update process is a cursort which does row by row updates so it is always one row locked or 1 page locked rather than having the row locked. I had changed the locking scheme for the table to row level locking but had serious performance hits regarding the website search process in sybase 11.9.2. I never had a performance problem in 12.0 with row level locking. Any help is appreciated.......

    Regards

    Jaideep
    Originally posted by tezza_chen
    I may not able to give any concrete solution.
    To answer your queston, I belive is no. Sybase deadlock policy is based on the fact that the process (involved in deadlock) with the lesser cpu time will always be imposed as the deadlock victim for eviction. At the moment, even up to the current release of ASE, there is no option to set priority for a process to be imposed as the deadlock victim.
    Hence, I guess you have to either change the way you access the table in these processes. Otherwise, try as far as possible to keep the 2nd process (which does update) short - if you can split this into smaller transaction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •