inabahare / lewd2

A based file uploader
https://lewd.se
GNU General Public License v3.0
23 stars 3 forks source link

SQL connection fails (or something) after about unspecified amount of time #34

Closed kattjevfel closed 5 years ago

kattjevfel commented 5 years ago

The SQL connection fails (or something) after about 17 hours or someting like that, causing uploading to not work, you cannot log in and neither can /transparency be accessed as it reads from db

kattjevfel commented 5 years ago

It crashed again but now after just a few hours, running PossibleCrashFix branch

Output (spammed many times):

2019-01-04 02:11 +01:00: error: sorry, too many clients already
2019-01-04 02:11 +01:00:     at Connection.parseE (/var/www/lewd2/node_modules/pg/lib/connection.js:554:11)
2019-01-04 02:11 +01:00:     at Connection.parseMessage (/var/www/lewd2/node_modules/pg/lib/connection.js:379:19)
2019-01-04 02:11 +01:00:     at Socket.<anonymous> (/var/www/lewd2/node_modules/pg/lib/connection.js:119:22)
2019-01-04 02:11 +01:00:     at Socket.emit (events.js:182:13)
2019-01-04 02:11 +01:00:     at addChunk (_stream_readable.js:283:12)
2019-01-04 02:11 +01:00:     at readableAddChunk (_stream_readable.js:264:11)
2019-01-04 02:11 +01:00:     at Socket.Readable.push (_stream_readable.js:219:10)
2019-01-04 02:11 +01:00:     at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2019-01-04 02:11 +01:00: (node:8784) UnhandledPromiseRejectionWarning: error: sorry, too many clients already
2019-01-04 02:11 +01:00:     at Connection.parseE (/var/www/lewd2/node_modules/pg/lib/connection.js:554:11)
2019-01-04 02:11 +01:00:     at Connection.parseMessage (/var/www/lewd2/node_modules/pg/lib/connection.js:379:19)
2019-01-04 02:11 +01:00:     at Socket.<anonymous> (/var/www/lewd2/node_modules/pg/lib/connection.js:119:22)
2019-01-04 02:11 +01:00:     at Socket.emit (events.js:182:13)
2019-01-04 02:11 +01:00:     at addChunk (_stream_readable.js:283:12)
2019-01-04 02:11 +01:00:     at readableAddChunk (_stream_readable.js:264:11)
2019-01-04 02:11 +01:00:     at Socket.Readable.push (_stream_readable.js:219:10)
2019-01-04 02:11 +01:00:     at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2019-01-04 02:11 +01:00: (node:8784) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an asy
nc function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
2019-01-04 02:11 +01:00: (node:8784) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are no
t handled will terminate the Node.js process with a non-zero exit code.

full log of errors

inabahare commented 5 years ago

Will close tomorrow if there are no crashes overnight!

inabahare commented 5 years ago

I am considering this fixed!!!!!!!