cancel
Showing results for 
Search instead for 
Did you mean: 

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

rasmuswulff_jensen
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Hi,

did yo try to compile your AddOn with the old 2005-DLLs (SAPBouiCom,SAPBobsCom) and install/run this AddOn on 2007?

(If you don't make use of new 2007-SDK-features it should be possible)

I don't know...maybe it makes a difference to your issue...

Edited by: Roland Toschek on Oct 29, 2008 10:55 AM

rasmuswulff_jensen
Active Contributor
0 Kudos

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

Answers (3)

Answers (3)

rasmuswulff_jensen
Active Contributor
0 Kudos

Closing thread

Former Member
0 Kudos

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.

rasmuswulff_jensen
Active Contributor
0 Kudos

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"

former_member201110
Active Contributor
0 Kudos

Hi Rasmus,

This sounds like a deadlock on the database. It certainly fits the symptoms (ie addon stops working, other users locked until this process is killed, apparent randomness of the problem, occurs more often with all users on the system). When the system is frozen, did you look at the locks and processes that are running in SQL? Most likely, all other users are blocked because the addon has locked a table like ONNM. The apparent randomness occurs because it's the precise timing of the processes running in SQL that will produce the deadlock, which unfortunately makes it difficult to reproduce easily.

I know that SAP are working in this area with some sites. They have a new logging tool (...well, it's new to me ) that you could speak to them about which might assist in spotting the problem. It's called Live Monitor.

Kind Regards,

Owen

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Rasmus,

As Owen stated above, SAP are paying close attention to this kind of DB deadlock, data corruption etc issue. A tool and methodlogy has been introduced to monitor/trace the system on top of MS SQL Analyzer, try to find out how to reproduce. I suggest you go to SAP Support for help on this issue. Thanks.

By the way, B1UP is great. Some partners in China and Malaysia are quite interested on it. They wonder whether a Chinese language version is available or not.

Kind Regards

-Yatsea

Former Member
0 Kudos

Rasmus,

I fought with similar problem last week. When I created more vendor orders in a time, often SBO hangs and no other users can work. This occurs firsttime in PL40.

The behaviour was, that after this hangs table CHEN kept locked and until SQL serve unlocked it (depends on sql settings, how long transaction will be active), no other user can work.

Solution for me was rewriting the addon - no other calculating or checking in process of adding order - I store informations about order in array and than from this array Im creating order (or with xml). After this changes it works.

hope it helps a bit

rasmuswulff_jensen
Active Contributor
0 Kudos

Hi All.. thank you for the feedback...

> Petr: We have done somthing similar (all data that need to be created are in objects) we have a few recordset operations left but I guess we need to address those...

Edited by: Rasmus Jensen on Oct 24, 2008 9:03 AM

rasmuswulff_jensen
Active Contributor
0 Kudos

Now this is strange... The customer ran 4 add-ons when crashes occured... It seem that if we turn of the 3 other add-ons crashes does not occur... The strange thing is that non of the other add-on did anything to invoices ... Have anyone seen such a scenario before or could it be some crazy new add-on timeout becuase the system is so busy generating invoices...?

Nussi
Active Contributor
0 Kudos

Hi Rasmus,

the only problem i had was when there where addons that worked with transactions.

than all other addons & clients freezed. a deadly lock only when the addon

crashed while the transaction was still open...

lg David