My client has a desktop application that he uses to run his business. It runs against a local database. He wanted a web site to display some of this data.
I wrote an ASP.NET MVC5 web site, that includes an action that takes an HTTP POST containing some XML, and updates the web site's database based on the contents of the XML. His application makes multiple posts to the web site to upload the data. These posts are made on after the other, not simultaneously.
However, we have discovered that when he has a lot of data to upload, it will work fine for a while, then he gets a "Service unavailable" error. I checked with the hosting company, and they said that the pool log file was full of entries like this...
11/10/2015 4:15:03 AM --- a worker process serving application pool has requested a recycle because it reached its private bytes memory limit.
Anyone any ideas what I can do about this? The web site uses Entity Framework, which I realise is not the most memory-friendly way to do it, but to recode it all to access the database directly would be a huge job. I'm hoping there might be some easier way.
Would it help if he slowed down the requests? It occurred to me (possibly incorrectly as I'm not expert in these matters) that it might be that the garbage collector just isn't getting chance to free up the memory before more is requested. If so, would slowing down the rate of posts help?
As I said, I'm not being an expert in these areas, so please go easy on me!