R
Railway

βœ‹ο½œhelp

Django projects loading issues

Ffunfetticodecake9/7/2023
I have two Django projects that I have deployed and both projects are facing similar issues (most likely because I built them with the same "ideologies"). For one of my projects that's bigger in scale and features, I tried looking at a past thread where @Brody gave a suggestion to add --timeout 0, but that actually made the site just not load at all and with Railway saying "Application failed to respond".

I rely on fetching, timeouts and caching quite a bit with these projects so could those reasons be why things are taking so long? Here's one of the projects that is a public repo: https://github.com/pecodeliar/JukeworkWeb I'm like 99% percent sure it's a me problem so I guess I would just like some pointers where in my code I'm going terribly wrong in terms of how a production level app should be written so these loading problems don't occur.
Ffunfetticodecake9/7/2023
02122a65-c97a-4cd7-afa6-af31d7e6bd8c
The project ID is for the bigger app, a menstrual cycle tracker. It's a full stack app that relys quite heavily on the API which is why I do so much caching. I'm wondering if that's one of the biggest causes of these issues.
Oh, and I'm using DRF, not sure if that makes a difference or is helpful.
Bbrody1929/7/2023
real quick can you show me where I said to do --timeout 0
nvm that's actually valid, it sets the timeout to infinity
what do your deployment logs look like?
Ffunfetticodecake9/7/2023
Just checked, for Jukework specifically, I have a lot of "worker exiting" messages in red.
Ffunfetticodecake9/7/2023
Sorry, not at home at the moment so smaller screen.
Bbrody1929/7/2023
in the repo you linked there was no --timeout flag set, meaning the default timeout of 30 seconds is used, so should a request to your app ever take longer than 30 seconds?
Ffunfetticodecake9/7/2023
I did have one, the one you suggested that I search, but had to remove it because it would never load.
I am honestly not sure if it should, I am querying a lot of data though, upon log in, and right now I'm the only user LOL.
I'm not sure how bad it will get when I have multiple users.
Bbrody1929/7/2023
how long would these requests take when you run your app locally?
Ffunfetticodecake9/7/2023
Just off the top of my head, upon log-in, there's universal emotions which are like 40 items, then symptoms, like around 25, custom emotions, symptoms and qctivities then daily logs, the cycle logs, then cycle day logs, then a forecast and then calendar months.
Well actually no sorry, upon login, daily logs, cycle logd, cd logs and cal months don't get loaded. Those depend on which link you press while already logged in.
Not very long at all and you've said it yourself, there's no way I have better internet than RW.
I wanna say like 2-3 seconds at most.
Bbrody1929/7/2023
okay so you get infinite loading when --timeout 0 this leads me to believe that where ever your app gets the data from is never returning
Ffunfetticodecake9/7/2023
That browsable API is faster. The frontend has a lot of timeouts when first loading.
But it does without it. πŸ€”
Bbrody1929/7/2023
but you get worker timeouts?
Ffunfetticodecake9/7/2023
Yup!
Bbrody1929/7/2023
so that means gunicorn killed the request because it wasn't returning
is this a database connection that's hanging?
Ffunfetticodecake9/7/2023
I'm guessing? I'm still new to this sorry.
But like for Jukework, it's definitely returning something, just takes a couple of minutes sometimes.
Bbrody1929/7/2023
it should never take that long right?
Ffunfetticodecake9/7/2023
No.
I'm pretty sure it's my fault though, not tryna blame RW!
I just don't know where my fault is laying ATM. 🫠
Bbrody1929/7/2023
where are you getting the data from? postgres? an external api?
Ffunfetticodecake9/7/2023
Postgres via and API.
They're both full stack apps. I made the frontend, the backend and the API.
Bbrody1929/7/2023
pretty certain that this is just some upstream request that's infinitely loading, chuck in some print statements lol
Ffunfetticodecake9/7/2023
I shall but it also seems like...fine now? I'm trying on different browsers to replicate what's been going on for the past week and it seems to have cleaned itself up.
The app I linked for this questions no longer gets workers messsges in the deploy logs. Jukework does but it's still loading as fast as it would locally.
Not sure what happened but oh well LOL!
Bbrody1929/7/2023
that's bizarre
Ffunfetticodecake9/7/2023
Yeah, cause it wss literally for a good week. Yesterday is took like 4-6 minutes on avg to load just the front page for Jukework.
Forecycle (the one this question is linked to) took the same amount.
Thanks anyways though, maybe this was just some new account wrinkles! :kekw:
Bbrody1929/7/2023
I would still be considered that this might happen again in the future 🀣
Ffunfetticodecake9/7/2023
Wouldn't be surprised. :cryingman: Me and deployment really aren't friends.
Bbrody1929/7/2023
maybe it would be good to add logging with timestamps so you can know where in your code soft locks
Ffunfetticodecake9/7/2023
Oh! I didn't even know soft locking was a thing!
Bbrody1929/7/2023
anything is possible with python
Ffunfetticodecake9/7/2023
Okay, so every other fetch request is working perfectly, splendid, EXCEPT for symptoms! I am not even sure why because it behaves the exact same way as emotions.
Bbrody1929/7/2023
what doesn't work specifically
Ffunfetticodecake9/7/2023
This is how it's supposed to load. It's specifically universal symptoms that all auth users have access to.
Ffunfetticodecake9/7/2023
It loads perfectly fine on every other device broswer. I store them in the local storage since they can't be changed by users.
Ffunfetticodecake9/7/2023
But for some reason, ob ny Mozilla browser on mobile specifically (works fine on desktop), nothing loads at all.
Bbrody1929/7/2023
you are on mobile, it is near impossible to debug web apps on mobile
what browser is this? Firefox?
Ffunfetticodecake9/7/2023
I know. That's why I was trying aim a blow at the wind asking one of the staff. :cryingman:
Bbrody1929/7/2023
about a css issue 🀣
Ffunfetticodecake9/7/2023
Yeah, sorry, I still say Mozilla.
Bbrody1929/7/2023
are you near a computer?
Ffunfetticodecake9/7/2023
:sadcat:
Yeah, I'm on the desktop for mozilla where it's loading fine!
Bbrody1929/7/2023
well time to get the Firefox remote debugger running
or try to switch Firefox desktop into mobile mode maybe
Ffunfetticodecake9/7/2023
Remote debugger? 😳 I've never heard of that before!
Bbrody1929/7/2023
well you've seen the dev tools for Firefox desktop right?
Ffunfetticodecake9/7/2023
Of course. Couldn't get this far without em.
Bbrody1929/7/2023
the remote debugger allows you to view the dev tools for your phone's browser, on your computer
well at least chrome has this, I can't imagine Firefox wouldn't
Ffunfetticodecake9/7/2023
I think I found what you're talking about!
Bbrody1929/7/2023
awesome
Ffunfetticodecake9/7/2023
It requires a USB connection so I'll take a gander when I get home!
Let me try your other suggestion to make the desktop behave like mobile....
Bbrody1929/7/2023
chrome can do it over WiFi, Firefox can't?
Ffunfetticodecake9/7/2023
My work conputer doesn't use Wifi, uses ethernet.
I think. I know it's a wire. πŸ’€
Bbrody1929/7/2023
well it doesn't matter, doesn't need to be WiFi, I should have said LAN
Ffunfetticodecake9/7/2023
To be fair, I wouldn't know the different. I know next to nothing about hardware.
Bbrody1929/7/2023
but if it's a work network they might have ap isolation turned on
is there anyway I could access the page that's giving you problems?
Ffunfetticodecake9/7/2023
Desktop still working fine even when it's in "mobile" mode LOL
I don't think so no. πŸ€” Do you know anything about women's health?
Like the difference between a period and menstrual cycle? /genuine-question
Bbrody1929/7/2023
you just gonna out me like that
Ffunfetticodecake9/7/2023
😭😭😭
Bbrody1929/7/2023
our health classes sucked, so no i dont
but do i need to know about women's health to get to the page that isnt working?
Ffunfetticodecake9/7/2023
Specifically to register and allow the app to work properly LOLOL
Bbrody1929/7/2023
you give me a temp user account πŸ™‚
Ffunfetticodecake9/7/2023
Hm, okay, I was thinking about making one anyway!
Give me like 5 minutes. Can you friend me so I can DM credentials?
Bbrody1929/7/2023
will do

Looking for more? Join the community!

R
Railway

βœ‹ο½œhelp

Join Server
Recommended Posts
Clicking 'Observability' button goes to the wrong projectExpected Flow - You click on a project, go to 'Observability' and view the logs. - You then click onTell Nixpack to include public folder in buildI have an Axum build on Rust that is are web socket chat rooms, which also serves static files. When.NET 6.0 Deployment Failed during build processProject ID f8a04cde-c088-4000-923e-0de1e0d144aa I can not deploy my backend, this is the error NETSMonorepoIf I am inside monorepo how will assigning domain work I wanna asign domain in two aspectsI can not deploy angular project, killedI do not know what is the problem I hope someone can help me, Project ID dd70810d-29a4-4c5e-b7b4-f2NPM ssh dependancyHi I'm running into an issue where I'm using a private github npm dependancy and the build step is How to set mailgun to Ghost(docker) + SqliteI had used Ghost with mysql, but currently I try to use a new Ghost template with Sqlite. I did not Timeout while waiting for registry?All of my deploys have been building successfully but failing to deploy for the past ~hour or so. TContainer is failing to start.Everything was working fine, I just added a few new features to the app and now it is failing to depSeeing failures in deploying saying container shut down, but cannot find the container logs.Need help figuring out how to debug this issue with deploying to prod. From my end I don't think theHow to Delete Project?How do I delete a project I created so it doesn't show up in my homepage? Railway's documentation juInitial Deployment Continues To FailHello everyone. I am trying to setup, and stuck at the starting line. All ive done is connect githubDeployments sometimes takes timeMany times deployments take more than 5 minutes, although it should take less than 1 minute.Sveltekit memory usagemy sveltekit apps are almost locked to 100mb memory, anyone knows if theres like an option or somethOpen SourceHi, I am Richard, creator of ExpressoTS framework. Currently we are working in a section of our docuDifficulty with deploying a Flask + React appHi - I have a code architecture with a Flask backend (python) and a Node React frontend. The architeAny way to measure API Metrics for APIs deployed via Railwaythe no. of requests, the avg response timeMultiple accounts with same Github account?Can I somehow have multiple accounts but use code from the same Github account? I want to have a sepCan't create accountI try to signup using email but only get this error: "Device requesting login is not supported pleaRedis Data not showing up. Also not able set the key as well from redis-cliI am not able to access redis via the Console of railway as well not set any key via redis cli