-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temp tables connection leak #5556
Comments
After trying to figure out why I kept getting error scheduled task cannot run in the log. It turned out that whatever the value in StoreUrl is when the server first boot, that is the URL used to call the schedule tasks, even after Restart Application. In my case I was switching between http -> https and non-www -> www URL. Even after issuing Reboot Application, the value originally stored in StoreUrl is retained. |
I was able to restart the application but leaving it running for about half a day I would get this error Mar 31 00:00:34 bottles nopCommerce440-example[1039]: #33[41m#033[30mfail#033[39m#033[22m#033[49m: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3] After trying to restart nginx and nopCommerce services a few times I would get this error and cannot recover Mar 30 23:27:52 bottles systemd[1]: nopCommerce440.service: Scheduled restart job, restart counter is at 235. I'm going to try to install pgbouncer to see if it helps with the Postgres connections. |
Going to move the connection to a new issue. I don't believe it's related to to the original issue. |
also posted at #5582 (Database connections not close) |
I believe I tracked down the issue, but I don't know how to fix it.
|
Closed #5556 |
I made a new build and been running this for 5 hr and don't see the issue anymore. |
How can I fix it for the current moment before the new version release ? I'm in production environment(v4.40.3) and can't wait for the new version. |
@rachaH You can build the 4.40-bug-fixes branch that already has the fix. Btw, we're going to release the next minor version soon. |
nopCommerce version: 4.40
Steps to reproduce the problem: I'm running the linux build on Digitalocean with Ubuntu 20.04(LTS)x64 Basic instance with 2G of RAM, Postgres, nginx, and Let's Encrypt SSL. When I go to Administration and restart the application the deamon gets killed with a status=6/ABRT.
Digging through the log I find this in /var/log/syslog
Mar 20 04:18:17 bottles systemd[1]: nopCommerce440.service: Main process exited, code=killed, status=6/ABRT
Mar 20 04:18:17 bottles systemd[1]: nopCommerce440.service: Failed with result 'signal'.
Mar 20 04:18:27 bottles systemd[1]: nopCommerce440.service: Scheduled restart job, restart counter is at 91.
Mar 20 04:18:27 bottles systemd[1]: Stopped Example nopCommerce app running on XUbuntu.
Mar 20 04:18:27 bottles systemd[1]: Started Example nopCommerce app running on XUbuntu.
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at Nop.Services.Tasks.TaskThread.TimerHandler(Object state) in C:\andrei\nop_sources\src\Libraries\Nop.Services\Tasks\TaskThread.cs:line 121
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: --- End of stack trace from previous location ---
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.TimerQueue.FireNextTimers()
Mar 20 04:18:34 bottles nopCommerce440-example[20927]: at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
Mar 20 04:18:35 bottles systemd[1]: nopCommerce440.service: Main process exited, code=killed, status=6/ABRT
Mar 20 04:18:35 bottles systemd[1]: nopCommerce440.service: Failed with result 'signal'.
Mar 20 04:18:38 bottles kernel: [ 8327.985499] [UFW BLOCK] IN=eth0 OUT= MAC=3e:60:4c:f4:6e:2c:fe:00:00:00:01:01:08:00 SRC=89.248.165.204 DST=161.35.238.204 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=27564 PROTO=TCP SPT=59976 DPT=17191 WINDOW=>
Mar 20 04:18:45 bottles systemd[1]: nopCommerce440.service: Scheduled restart job, restart counter is at 92.
Mar 20 04:18:45 bottles systemd[1]: Stopped Example nopCommerce app running on XUbuntu.
Mar 20 04:18:45 bottles systemd[1]: Started Example nopCommerce app running on XUbuntu.
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at Nop.Services.Tasks.TaskThread.TimerHandler(Object state) in C:\andrei\nop_sources\src\Libraries\Nop.Services\Tasks\TaskThread.cs:line 121
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: --- End of stack trace from previous location ---
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.TimerQueue.FireNextTimers()
Mar 20 04:18:52 bottles nopCommerce440-example[20968]: at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
Looking at the code in TasksThread.cs looks like it has something to do with the timer.
Thank you for looking into this.
The text was updated successfully, but these errors were encountered: