Deployment stopped functioning about 4hrs ago

Problem description

my deployment stopped working about 4 hrs ago, got this in the logs,

now receiving error 500 for posts and gets

went to the console and now need to be started and i get this:

02/17/24 05:39:52 AM
WARNING: This is a development server. Do not use it in a production deployment.
02/17/24 05:39:52 AM
* Running on all addresses (0.0.0.0)
02/17/24 05:39:52 AM
* Running on http://127.0.0.1:5000
02/17/24 05:39:52 AM
forwarding local port 5000 to external port 1104
02/17/24 05:39:52 AM
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
02/17/24 05:39:52 AM
* Debug mode: off
02/17/24 05:39:52 AM
* Serving Flask app ''
02/17/24 05:39:45 AM
starting up user application

so i redeployed and getting same messages, do i need to buy another upgarde or something? starting to think it would be easier to put on my own server.

webview also says {…}.replit.dev not replit.app ?? is my deployment back in the dev environment?

Expected behavior

respond like it was before

Actual behavior

logs :

02/17/24 05:39:52 AM
WARNING: This is a development server. Do not use it in a production deployment.
02/17/24 05:39:52 AM
* Running on all addresses (0.0.0.0)
02/17/24 05:39:52 AM
* Running on http://127.0.0.1:5000
02/17/24 05:39:52 AM
forwarding local port 5000 to external port 1104
02/17/24 05:39:52 AM
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
02/17/24 05:39:52 AM
* Debug mode: off
02/17/24 05:39:52 AM
* Serving Flask app ''
02/17/24 05:39:45 AM
starting up user application

Steps to reproduce

sent post request -

GET /access/Kakashi_11

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Serving Flask app ''
 * Debug mode: off
 * Running on all addresses (0.0.0.0)
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://127.0.0.1:5000
 * Running on http://172.31.196.6:5000 (Press CTRL+C to quit)
172.31.196.6 - - [16/Feb/2024 22:02:02] "GET / HTTP/1.1" 200 -
172.31.196.6 - - [16/Feb/2024 22:07:35] "GET / HTTP/1.1" 200 -
172.31.196.6 - - [16/Feb/2024 22:07:49] "GET / HTTP/1.1" 200 -
172.31.196.6 - - [16/Feb/2024 22:18:35] "GET / HTTP/1.1" 200 -
[X] Exception Occured :  400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
172.31.196.6 - - [16/Feb/2024 22:18:45] "GET /access/Kakashi_11 HTTP/1.1" 500 -
[X] Exception Occured :  400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
172.31.196.6 - - [16/Feb/2024 22:18:45] "GET /access/Kakashi_11 HTTP/1.1" 500 -

Browser

chrome

OS

windows

Device if mobile

N/A

Plan

don’t know what your marketing department calls it but i’m paying for something, do i need to pay more?

Are you sure you deployed your repl? You will need to deploy it as either Autoscale, or Reserved VM > Web Server.

yes, was delpoyed, and i redeployed again about an hour ago before i messaged

these are the responses i’m getting now? why was there a change, i haven’t chaged anything from about a month ago until today when investiation why it wasn’t working

1 Like

FYI: It’s generally a good idea not to run Flask normally in a production deployment. Use something like gunicorn (poetry add gunicorn in the Shell and set your deployment run command to gunicorn server:app).

would this have caused my problem? why was it working before?

I don’t think so, a WSGI server is simply more secure. It just seems to be an issue with your code. Can you double check that it’s working in development?

I don’t know how to serve the required JSON body in development as no external endpoint. use to work fine, can’t quite work out what the issue is and it’s not my code, i don’t really know what in’m doing, just using it as a API for another program

Wait, what do you mean? Can’t you use the replit.dev link? Or am I misunderstanding?

didn’t think you could do that any more, thats why i had to deploy

No, that would defeat the entire purpose of deploying. Try pressing the Run button, and if the Webview doesn’t show up, try to look for it under Tools in the sidebar or open a new tab and search for it.

ok i see now,

1 Like

get this though - bad session id??

172.31.196.40 - - [17/Feb/2024 05:27:03] "POST /access/brendan_r_moss HTTP/1.1" 500 -
{'pine_ids': ['PUB;ef9856fc92a94996a06651f07dc80349', 'PUB;242b39c3d53a405881d51da5fd37f877', 'PUB;5ecb2f82c835479a895e53317b469b4f', 'PUB;3772d9240a1f475aab4c3b2eb8878389', 'PUB;86191cbaf8c542bd9ec4f32dba536a9e']}
['PUB;ef9856fc92a94996a06651f07dc80349', 'PUB;242b39c3d53a405881d51da5fd37f877', 'PUB;5ecb2f82c835479a895e53317b469b4f', 'PUB;3772d9240a1f475aab4c3b2eb8878389', 'PUB;86191cbaf8c542bd9ec4f32dba536a9e']
Getting sessionid from db
{"detail":"Login required.","code":"login_required"}
sessionid from db : 1v0s7ic3yx5ptcjgpvm1y5y4z3d5qcjb
session id from db is invalid
TWAPI/3.0 (Linux; #13~22.04.1-Ubuntu SMP Wed Jan 24 23:39:40 UTC 2024; 6.5.0-1013-gcp)
[X] Exception Occured :  'sessionid'
172.31.196.40 - - [17/Feb/2024 05:27:43] "DELETE /access/brendan_r_moss HTTP/1.1" 500 -

I don’t know, again, seems like an issue with your code.

1 Like

thankyou for trying

i will see what else i can find out, might be the other end not providing the session id

1 Like

For anyone else that ends up here this started working again. Not sure if it was atradingview issue or a replit issues but was security id related.