Closed ricsmania closed 7 years ago
It looks like we are waiting for QueuePollInterval
time span twice: SQLiteStorageConnection.CreateExpiredJob
and SQLiteWriteOnlyTransaction.Commit
wait until db write lock is released (see SQLiteJobQueue.Dequeue
on the Worker thread). The interval is 15 seconds by default, this is why we might get something like 28000 ms.
I think I've fixed the issue in the #10 pull request, waiting for feedback. In the meantime you could fiddle with QueuePollInterval
.
I'm trying to use Hangfire with Sqlite, and when I do that my application gets very slow.
Using Visual Studio 2017, I created a Asp.Net Core Web API project.
I added the configuration to Startup.cs:
I then added a Hangfire call to my Get methd on the values controller
When I use Redis the controller responds in around 7-15 ms.
Executed action TesteHangfire.Controllers.ValuesController.Get (TesteHangfire) in 7.6838ms
When I use SqlServer the controller responds in around 70-150 ms.Executed action TesteHangfire.Controllers.ValuesController.Get (TesteHangfire) in 78.5856ms
But when I use Sqlite the controller takes more than 28000 msExecuted action TesteHangfire.Controllers.ValuesController.Get (TesteHangfire) in 28842.5443ms
At first I was getting all kind of erros when writing to DB, but then I added this config and the errors stopped, but the application is still slow: