a16z-infra / ai-town

A MIT-licensed, deployable starter kit for building and customizing your own version of AI town - a virtual town where AI characters live, chat and socialize.
https://convex.dev/ai-town
MIT License
7.72k stars 713 forks source link

Convex Local Backend Errors #243

Closed MCPE10 closed 5 months ago

MCPE10 commented 5 months ago
Screenshot 2024-06-05 at 07 59 48

I am getting these errors when launching the backend, and in the AI Town, I can't click around to move my character. Does anyone know what is going on? See my previous issue #240 too. Thanks!

ianmacartney commented 5 months ago

This happens when there's a lot of contention reading & writing to a certain document. You can check out the document it's referencing - my guess is there is some contention updating the lastViewed timestamp - when a bunch of clients all try to tell the world it's not stale, and all try to do it at once. we could add some jitter there, but hopefully these are all happening from heartbeatWorld which doesn't matter too much if it fails. bummer it doesn't say locally what function it's in in the log. If it's causing issues / isn't in heartbeatWorld plz re-open!