Ask coding questions

← Back to all posts
App keeps getting down after a while
MRITYUNJAY1 (0)

I'm running a node express application on replit shell but it keeps getting down after a while, I'm not able to figure-out why this is happening..

Error: Connection lost: The server closed the connection.

Answered by codingjlu (484) [earned 5 cycles]
View Answer
Comments
hotnewtop
codingjlu (484)

I assume that has something to do with mysql. It's not necessarily a problem with your code; perhaps the SQL server you are using has some issues.

MRITYUNJAY1 (0)

@codingjlu,
Thanks for pointing, RESOLVED

codingjlu (484)

@MRITYUNJAY1 k then could you select my answer?

codingjlu (484)

DO NOT PUT YOUR SQL INFORMATION PUBLICLY!! Go to the button on the left with a lock on it, click it, put your secrets inside there and use process.env.VARIABLE_NAME!!

Coder100 (18939)

Try forking the repl, and make sure your code has no errors.
Recently repl has been slow for me, and downtime is probably connected to that.

However, having Hacker does help, it gives you the boost feature which for me has fixed most issuse.

QuantumCodes (26)

Its automatic. U need hacker plan or a pinger

QuantumCodes (26)

@MRITYUNJAY1 i will help you put it up. Put your link in my pinger: https://Repl-Pinger.quantumcodes.repl.co/add

Remember your linkID after putting it as... it will help you remove it from this pinger 😃

QuantumCodes (26)

@MRITYUNJAY1 AFAIK, replit keeps a repl online for about 1 hour.. if no kne visited in that time, it sleeps. So if u ise a pinger, it will keep visiting that repl. https://blog.replit.com/alwayson -- some info...

MRITYUNJAY1 (0)

@QuantumCodes ,Thanks for giving your time, I've figured it out, actually mysql server was disclosing the connection after a short while...

QuantumCodes (26)

@MRITYUNJAY1 Thanks for showing that glitch... idk why this happens though... i will check about that... it works but just not for your link
Edit: lol, just 1 space broke it .. i fixed and added. If it works, mark my 3rd comment correct :)

QuantumCodes (26)

@MRITYUNJAY1 i can delete anyones link... and.. i can add2 same links... is this intended

MRITYUNJAY1 (0)

@QuantumCodes,
no, will add the functionality later...

MRITYUNJAY1 (0)

@QuantumCodes,
that's what coding all about...