Still getting stuck here, I just can't
Still getting stuck here, I just can't figure out why it doesn't like my setup.
- My app is definitely running on 8080
- My image is within all limits
- If I pull and run the image locally everything works completely fine
I feel like my only option is to strip my entrypoint down to nothing and slowly add stuff until it breaks again (assuming that's even the problem? 😭)
15 Replies
Are there container logs in the dash?
Only these :(

if my entrypoint had some issue with it, I'd expect to at least see my startup
echo
s, I don't know if it's even getting to that point?
idk unless I shouldn't expect to see any of those logs here?
i have observability turned on, is there anything else i can do to see more output, do you know?
wrangler logs, dashboard logs - nothing's really giving me any cluesif your container is logging you should see it there.
Can you give me the id?
workers/containers/applications/<> ?
that shows up from
npx wrangler containers list
well I can see that it is running at least. Trying to see if I can find the problem.
Do you log anything on startup?
Maybe not immediately but yeah, before I run anything that should be able to error for sure
these are the first few lines of my entrypoint
My other thought is how are you accessing the container in your code? is it possible your spinning up another container but never going back to the same one?
Yeah the worker code is definitely the piece I'm scratching my head on the most. All of the examples are great but they're kinda simplistic, too
I assign each new user a UUID and use that as the container ID. they send me their UUID with all future requests, so I think it should be going to the same place
let me pull out some relevant pieces..
(also there were zero examples of how to type my stuff properly so I've really been winging it)
tried to include all of the main worker<>container mechanisms in there, got a bit length my b
Where you log the creating request for endpoint is the body undefined?
And what is the goal with the CONTAINER_X differentiation?
I have a few different flavors of containers, the user can select which one they want to use for their session
yeah in most cases it will be
I'm not eactly sure what fixed my issue (there were a few) but I think my main issue was a small typo.
in my entrypoint, I had:
so it was execing the session and then putting it in the background, which I think got it terminated immediately. i removed the
exec
and that (possibly with a few other changes?...) got the container starting and producing logs 👍oh nice. I was in the process of typing up a long response 😅 .
I'll send what I had anyways though just in case it is useful. Feel free to ignore if not though.
I did something similar to this in the past by having a manger DO that dealt with storing state/routing to existing containers.
The contructor looked something like:
And I would call it like:
Where CONTAINER_{DEV/BASIC/STANDARD} were defined in the wrangler.jsonc as durable_objects and under migrations as new_sqlite_classes.
Then the function analogous to your findContainer() was part of the manager DO and was hidden from the worker with a call like:
But internally the manager was just doing
const binding = this.bindings[name]
ooh, neat, I like that 👀