a year ago
Hey team my application is currently active and runnign on a Pro plan and has a huge influx of users but i have been getting the following error making my postgress server shut
Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "53100", message: "could not resize shared memory segment \"/PostgreSQL.1340169832\" to 196736 bytes: No space left on device", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
166 Replies
a year ago
<#727685388893945877> #5
I apologise sir - please redirect me to a person if possible, i am sorry to tag you - but you've always been of great help didn't know what to do
a year ago
i've made the needed change to prevent the error going forward, its in a staged change, feel free to apply when you want
a year ago
not enough shm space
a year ago
after applying my change, no
Thanks a ton, i really appreciate it -
Applied it
Apologies again on tagging you -we have a campaign running and have ~4k-5k concurrent users on platform
a year ago
perhaps you would be interested in enterprise, that way you could wake us up in the middle of the night for platform issues, and we wouldn't send you the readme! 😆
100% for future campaign would consider it - Thanks for the support just bear with me on this one.
And can we keep this open for another day the campaign ends in ~36hrs
a year ago
yep, wont close, but without enterprise, i can't promise we will be able to answer anywhere as fast as ive done today
a year ago
Pro SLO is 12 hours iirc
What's timezone ?
I won't be able to this time it's be tough to get approvals.
But thanks a ton I appreciate i just hope this doesn't happen again and we should be good!
a year ago
timezone doesnt come into play here, you'd get an answer within 12 hours max
i feel there's a pattern after every certain number of read/writes this happens
a year ago
what postgres service?
This is logged on Nextjs using with Prisma - is that what you meant ?
a year ago
nope, in the project you linked, there are two postgres services
a year ago
id please
a year ago
in the url
a year ago
no what i meant haha, but that works too
a year ago
please provide the latest error
ConnectorError(ConnectorError { userfacingerror: None, kind: QueryError(PostgresError { code: "55000", message: "lost connection to parallel worker", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
a year ago
thats not the same error?
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "55000", message: "parallel worker failed to initialize", severity: "ERROR", detail: None, column: None, hint: Some("More details may be available in the server log.") }), transient: false })
OH yeah this looks a different one
a year ago
where is the next site hosted?
a year ago
then you are opening and closing database connections for every request since its serverless
a year ago
use pgbouncer or run your app on railway within the same project
a year ago
fun fact, we moved the railway.com site from vercel to self hosted on railway live
My problem is time - this is a short term project which closes in <24hrs now
a year ago
you are bumping up against postgres max connection limits, i can increase them?
a year ago
i know, your current connections is 976
a year ago
989 now
let me restart the db once - that'll reset the connections as well right ?
a year ago
yeah it would drop a lot of connections, im not sure you want that?
things are already failing - and railway would be back in couple seconds i feel ?
a year ago
well you already did it
a year ago
climbing fast
a year ago
well it would be the fastest
a year ago
this could also drop connections, are you sure you want me to set it?
a year ago
the database needs to be restarted after making this change, am i good to do that
a year ago
okay now max 4k conns
a year ago
i'd like to take this time to again mention that i was only able to answer since i was at my laptop on discord, we cannot promise anyone will answer this fast when youre only on pro
ConnectorError(ConnectorError { userfacingerror: None, kind: QueryError(PostgresError { code: "53100", message: "could not resize shared memory segment \"/PostgreSQL.1707297426\" to 196736 bytes: No space left on device", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
Still getting this
a year ago
i can increase the shm size to 1gb, this will fully redeploy the database
a year ago
no it doesnt touch your data
a year ago
10 seconds tops
a year ago
okay, deploying now
a year ago
done
okay thankyou - i do understand about your enterprise plan solutions and i will 100% consider it for future big launches.
a year ago
i have to ask, what would you have done if i had gone to sleep? it is 1:30am here after all lol
I am so sorry - the only thing i could have done is keep closing connecitons
and restarting the db hoping atleast some people keep getting though
a year ago
enterprise is a year commitment btw
a year ago
1k /month
a year ago
paid monthy
a year ago
you'd have to sign a contract to pay 1k per month for a year
a year ago
sounds good to me
a year ago
though next time, maybe run the site on railway too, if railway can run railway.com, it can run your site
a year ago
hmmm

a year ago
would you like me to increase maxworkerprocesses?
a year ago
it will restart postgres again
a year ago
done
a year ago
okay, looks like worker count is regularly going above the previous default of 8
a year ago
256
Thankyou so much for your help - won't make you stay up for longer - really appreciate all the help
a year ago
for what its worth, this is technically something you could have done, not saying i had any problem doing it for you, just letting you know that its not like i went in a tweaked secret things in railway, everything ive been doing is something a non admin can do too (non admin as in you still have to own the database in railway)
a year ago
yeah exactly
ahh - understood
My lil minds could not understand what to do but will surely learn
a year ago
you must really be hammering this database
i think it's the number of users ?
We have had more than a million users in 2 days
a year ago
damn and youve only paid us $20 <:kekw:788259314607325204>
if it was not going to end tomorrow i would have upgraded to enterprise
a year ago
okay, plan b, i deployed pgbouncer for you, all you need to do is copy its DATABASE_PUBLIC_URL and then update that in vercel
a year ago
why do you say that, im connected to pgbouncer
a year ago
who do you have your domain with? cloudflare?
a year ago
and its simply pointed to the cname vercel gave you?
a year ago
and theres still issues?
a year ago
what errors are you getting?
a year ago
i think we should attempt to run your app on railway and make the switch, cloudflare should make it seemless
a year ago
no it doesnt
a year ago
yes you would
a year ago
then thats all plans i have exhausted
so if i could get access - i just deploy it on railway that's it right ?
i'll try to reach the team
a year ago
then do you want to spend your current time at least trying to run it on railway? do you use any vercel specific features?
a year ago
thats special
a year ago
i think you need to be running on vercel's infra for that dont you?
Can u help me with how can i check if my traffic is going through pgbouncer ?
a year ago
have you replaced the old database url in vercel with the one from pgbouncer?
a year ago
according to the network metrics, looks like most data is still going to just the database
it's some config on my end - i'll handle it - if the team is ready will try moving to railway
a year ago
you'd likely have to move off the edge functions first
a year ago
but, i have to sign off for the night as its now 2:30am for me
a year ago
thank you
a year ago
!s
Status changed to Solved brody • about 1 year ago
