So, I'm having a bit of an issue. The case is that we have this legacy application exposing a web service and takes in data sent to it from a mobile app.
As of recently we're beginning to get reports from users, that the process of handing in data from the mobile app is taking a very long time submitting the results.
When inspecting the web services log, we're seeing a lot exceptions, pointing to different methods in the code. Common for all these methods are, that they are write operations to the database. All of the methods are part of a larger SQL transaction which is opened by the application.
The application does a lot of checks and lookups when processing an incomming result before beginning to write to the database. Everything is done through Entity Framework and is wrapped inside a transaction.
It seems that these transactions lock the database, and block other incoming results from being handled which causes the attempt to hand in a result from the app to timeout and continuously try again until it's finally let through the gates. That's just our theory.
The transaction is just writing new data to the database - it's not modifying any existing data. The only reason for wrapping it in a transaction seem to be to be able to rollback the transaction if it fails - not to avoid any other write operations to the table while it works.
The main issue, is that it's a legacy application and we currently don't have access to anyone who worked on the application back in the days. So doing a rewrite would be very time consuming and error prone. We're in the process of phasing out this particular question so if only we can buy ourselves some time, that would be ideal.
If we are right in our assumptions, that there should be no issue in having two parallel write operations running, is there an easy way of allowing multiple of these transactions running simultaneously without having to do a major rewrite of the application?