www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - vibed services stop response after several days of work

reply Suliman <evermind live.ru> writes:
I got same problem on Windows Server 2016 and on Linux Debian 8.5.
I have few very simple backend based on vibed 0.8.1, compiler dmd 
2.075.1.

nginx servise is do port forwarding. Nothing more is used.

After several days of working I am begining to get "502 Bad 
Gateway" error. The service is not down, it's continue to 
working, but on Windows task manager I seen very low memory usage 
(0.4MB) and on Linux I see next: https://snag.gy/ban3jX.jpg (i am 
not familiar with Linux and do not sure if process is alive or 
not because htop do not show it)

The code is *very* simple https://github.com/bubnenkoff/dlang.ru

Is there any ideas how to diagnostic the problem?
Sep 01 2017
next sibling parent reply Suliman <evermind live.ru> writes:
On Friday, 1 September 2017 at 08:01:24 UTC, Suliman wrote:
 I got same problem on Windows Server 2016 and on Linux Debian 
 8.5.
 I have few very simple backend based on vibed 0.8.1, compiler 
 dmd 2.075.1.

 nginx servise is do port forwarding. Nothing more is used.

 After several days of working I am begining to get "502 Bad 
 Gateway" error. The service is not down, it's continue to 
 working, but on Windows task manager I seen very low memory 
 usage (0.4MB) and on Linux I see next: 
 https://snag.gy/ban3jX.jpg (i am not familiar with Linux and do 
 not sure if process is alive or not because htop do not show it)

 The code is *very* simple https://github.com/bubnenkoff/dlang.ru

 Is there any ideas how to diagnostic the problem?
I got error https://paste.ofcode.org/exCL5S2vbp6qhYBqj7v6ez Is it's issue with libevent? Does even-loop depend on used OS?
Sep 01 2017
next sibling parent Suliman <evermind live.ru> writes:
It's seems that it's error in libevent on Linux. I tried to add 
to dub.sdl:
versions "libasync"

and it's seems that not it's working (but I need more time to 
test).
Sep 01 2017
prev sibling parent reply =?UTF-8?Q?S=c3=b6nke_Ludwig?= <sludwig+d outerproduct.org> writes:
Am 01.09.2017 um 12:31 schrieb Suliman:
 On Friday, 1 September 2017 at 08:01:24 UTC, Suliman wrote:
 I got same problem on Windows Server 2016 and on Linux Debian 8.5.
 I have few very simple backend based on vibed 0.8.1, compiler dmd 
 2.075.1.

 nginx servise is do port forwarding. Nothing more is used.

 After several days of working I am begining to get "502 Bad Gateway" 
 error. The service is not down, it's continue to working, but on 
 Windows task manager I seen very low memory usage (0.4MB) and on Linux 
 I see next: https://snag.gy/ban3jX.jpg (i am not familiar with Linux 
 and do not sure if process is alive or not because htop do not show it)

 The code is *very* simple https://github.com/bubnenkoff/dlang.ru

 Is there any ideas how to diagnostic the problem?
I got error https://paste.ofcode.org/exCL5S2vbp6qhYBqj7v6ez Is it's issue with libevent? Does even-loop depend on used OS?
The dpaste shown doesn't seem to match the code in the repository. There is a reference to vibe.web.rest and the mysql-native driver, which I couldn't find in the dlang.ru source code. The error is most likely caused by issuing two requests to the MySQL server from two different tasks on the same connection. Usually, mysql-native uses a connection pool to avoid this, but that could have been circumvented by accident.
Sep 05 2017
parent crimaniak <crimaniak gmail.com> writes:
On Tuesday, 5 September 2017 at 13:51:40 UTC, Sönke Ludwig wrote:

 The error is most likely caused by issuing two requests to the 
 MySQL server from two different tasks on the same connection. 
 Usually, mysql-native uses a connection pool to avoid this, but 
 that could have been circumvented by accident.
In this case, you have `Data is pending on the connection. Any existing ResultRange must be consumed or purged before performing any other communication with the server.` usually.
Sep 05 2017
prev sibling parent Mike Wey <mike-wey example.com> writes:
On 01-09-17 10:01, Suliman wrote:
 I got same problem on Windows Server 2016 and on Linux Debian 8.5.
 I have few very simple backend based on vibed 0.8.1, compiler dmd 2.075.1.
 
 nginx servise is do port forwarding. Nothing more is used.
 
 After several days of working I am begining to get "502 Bad Gateway" 
 error. The service is not down, it's continue to working, but on Windows 
 task manager I seen very low memory usage (0.4MB) and on Linux I see 
 next: https://snag.gy/ban3jX.jpg (i am not familiar with Linux and do 
 not sure if process is alive or not because htop do not show it)
 
 The code is *very* simple https://github.com/bubnenkoff/dlang.ru
 
 Is there any ideas how to diagnostic the problem?
For the linux screenshot ps also includes the grep process you are pipping the ps output to. So your vibe.d instance isn't running. Are you running an release build? If so you might get a better idea of whats going on when using a plain or debug build. -- Mike Wey
Sep 01 2017