Skip to Content

Add crash on one client and cause all other SAP clients to freeze

Hi All

I have a big problem that I hope someone might help solve...

We have a customer adding 2000 invoices in 100-300 batches using a Add-on we have created.

Our add-on does what it is suppose to do, but at random intervals (more when many users are working), the add-on freeze (it does not crash with an error despite we have try/catch all over... Instead the addon goes down to use zero in CPU and nothing is added to the database)... This is a big problem since the add-on use transactions and if the "crash" happens within a transaction all other clients freeze (not able to do anything).... if the add-on process is killed all client "wakes up"...

The customer is running SBO2007A PL42 and have a 27GB database with around 15 simultanious users

Anyone:

- Who have experience somthing similar?

- Know any solutions / partial solution?

Kind Regards

Rasmus Wulff Jensen

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 12:06 AM

    With further research I found that the problem exists when the DI API SAP object has an unhandled internal error. Typically you can figure out the error by checking the objects GetLastError; however, if it's not handled then the DI never gets to this step.

    I found an unhandled exception (throwing COM SERVERFAULT errors) when I used the Add method. Once the object errored, it kept database transactions in an open state causing table locks where no other user could modify the data.

    My solution was to put a try-catch on the .Add method and disconnect from the SAP company if an error occured. Upon disconnecting the system released the locks on the tables.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi All

      Some additional facts and observations for furture reference:

      - The add-on does not freeze anymore after stooping other add-ons... It is believed to be because the one of the other add-ons was set to catch the StatusBar-event and the generating add-on produced tons of statusbar events (leading the add-ons to crash each other).. This is only teory and we are currently testing this...

      - I can understand why unhandled exceptions would lead to deadlocks but in our case this was not an issue since we allready had the try/catch structure in place

      - The main issue in all this turned out to be something completely different... It turned out that the invoice add-method threw an exception (The dreaded "The server threw an exception")... After investigation it was located that this happened for some odd reason when closing sales orders that were created during SAP RampUp and the specific problem was with the CodeBars column in the database being empty... Don't even ask why that can cause an unhandled exception becuase I don't have any clue to why this is...

      /Rasmus

  • Posted on Oct 23, 2008 at 04:59 PM

    Additional information:

    - Problem is completly random (can happen on sales order 1234 in one run but if you re-run the same order it have no problem)

    - It is invoices that are created based on sales orders

    - Problem have only been seen on PL42 but for one week on PL42 it worked

    - Problem seem to have happened after customer changed their default GrossBase Pricelist from "Last Purchase price" to "Item-cost"

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 27, 2008 at 04:41 PM

    I just upgraded to 2007A PL42 and SQL2005 last week. Since then I've had the same issue, continuous locks on the tables. I use the DIAPI extensivly. If one person is using the system then I have no problems. Once additional users login the application freezes and nothing works.

    I see that locks are created on the entire tables; you'll notice extensive "lock escallation" ocurring in profiler. Once the table is locked and another related table becomes locked by another process then you have infinite wait periods to release locks.

    Even though you are updating Invoices, SBO still updates the OITM tables with the IsCommited, Inventory, etc values. The OCRD and many other tables are also affected.

    The same application that I'm using ran perfectly in 2005A SQL 2000. I don't know whether this is a SQL2005 or SAP (or both) issue at this point.

    My only work around has been to restart the SQL service and tell everyone to use our application one at a time. I hope that we can find some answers soon.

    It may have something to do with the DI API COM Add/Modify calls throwing errors and leaving open locks.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 03, 2008 at 10:07 AM

    Closing thread

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.