• junk.mail291276 - Wednesday, February 28, 2018 2:19 PM

    Thanks everyone for your feedback. I will try the things you suggested.

    In the meantime, I used sp_who2 active to figure out that the database session for saving the data from the uploaded file is blocking the API from accessing the database.
    This article here explains what's happening:
    https://blog.wsol.com/sql-server-locks-blocked-processes-and-two-easy-ways-to-find-them
    It says:

    An example of this would be if request A is attempting to insert a row in table T. Subsequently, before request A completes, request B submits an update on table T. If the row affected by request A is also affected by request B, then a block is encountered, because the row affected by request A has an exclusive lock issued against it for the duration of the transaction.


    The funny thing is, this describes blocking as happening on a per row basis. We are experiencing blockage happening across different databases. For example, when we upload a file to our production database, the API cannot access the test database. Both are managed by the same SQL server, which tells me that blocking is happening at the level of the server itself, not specific rows.
    Based on this, is there anything else anyone can suggest?

    Actually, you really haven't provided enough information for us to really help.  Any answers we give are going to be shots in the dark since you have provided no real specifics.  Understand, we can't see what you see, and you haven't provided enough details.  Ask yourself, with what is just in your posts, could you answer your own question(s).