MongoDB failing to write
I'm getting the error
Connection accepted
pthread_create failed
ERROR(4850900): pthread_create failed
Thread creation failed
Unable to schedule a new loop for the session workflow
while trying to write to a mongodb its weird because my other pre docker database works just fine49 Replies
Project ID:
476d009b-e9c3-4f51-bc61-79795b33b4b6
476d009b-e9c3-4f51-bc61-79795b33b4b6
pre docker?
yea the other kind of database that doesn't have a volume attached
a database plugin
yes uwu
okay and those logs are coming from a mongodb service?
Yes
do the metrics look out of the ordinary?
not really
the plugin does consume a little bit less
have you looked into this error? it's not like railway is doing anything special, it's just a docker image that's being ran
Well, yes, found its a lack of resources
i don't know how many resources are being allocated to the deploy since i have pro it shouldn't be limited up to 32gb
well yes but this would be mongo not allocating itself enough resources
is there a flag or env var you can use to tell how many cpus it should use?
maybe it has a low default
Nope, its deployed as is
right, but you are free to modify as you see fit, a database as a service is a whole lot more versatile compared to the old plugins
look into this?
well chatgpt says i do have to increase the limits but in order to do so i have to run a docker command
docker run --ulimit nofile=65536:65536 --ulimit nproc=65536:65536 and docker run -m 4g ...
yes, usually thread creation is limited by Docker
unfortunately you can't change without Railway team
even a restart doesn't fix it?
they won't do it, it is not the correct solution
a restart does fix it but it fails after a while
the previous plugin does not have this issue
yes, was going to say that
the previous plugin used an old mongo image, you can always go back to the image that it used
how many clients are connected? maybe it's reaching the limit
Only two
a NodeJS whatsapp bot and myself thru mongo compass
weird
mongodb compass has a perfomance tab, try to monitor through that
without using a hallucinating ai, have you just tried to Google this error?
as i said, too many threads
linux has a limit of open files which it allows
if it reaches that limit you can't create additional threads
had that problem when installing software on bare metal and as suggested by chatgpt, you've to increase ulimit
Yes, all the results are from GO and other unrelated projects
your Google foo is lacking
see if there's anything in performance tab.
out of ideas here.
xd
the thing is, this doesnt happen with the older plugin
^
i don't know the exact version of the old mongo image, but the postgres image uses a timescale version of 2021.
try a image in that range 2021-2022
i'll pay you for join the team and fix it what do you think :p
current mongo version in use is 7.0.2
give me some example code that can trigger that error and I'll see what I can do
amazing
shhhhhhh
nobody saw that shhhhh
as you should
my use case makes sense at least, i only need a specific person to a specific project
well same
Redeployed the DB, just in case, right now it didn't throw the error
we'll see later
the offer is here if you want, not much I can jump into without a way to reliability reproduce this