I can't connet to Railway using the dashboard

I've created a RivetKit app, deployed to Railway (it's just the server, using hono). Super similar to this. Then I logged in to Rivet dashboard, selected Railway under "Connect Existing Project", got the 3 credentials there and pasted them in my Railway app. But I'm stuck in this loading. Any recs of how to fix it? Not sure how to proced, docs are not very clear here...
No description
12 Replies
Nathan
Nathan•2w ago
hey! can you post the logs on what you're seeing from railway?
rbravo
rbravoOP•2w ago
I tried to deploy the example, and one thing that I noticed is different from existing vs example is:
realtime@ start /app node dist/index.js
RivetKit 2.0.24 (File System) - Endpoint: http://127.0.0.1:6420 - Data: /root/.local/share/rivetkit/app-f53b52ad - Instances: 0 - Inspector: https://inspect.rivet.dev/?t=QjWPw8B8KLJVLuUzeChhDsAcmZMmPgSU Example:
template-railway@2.0.6 start /app NODE_ENV=production node dist/server.js
Serving frontend on port 8080 RivetKit 2.0.24 (Remote)
Rivet
A unified platform to manage your game servers & backend.
rbravo
rbravoOP•2w ago
More logs here if it helps
No description
rbravo
rbravoOP•2w ago
Also, not sure if this (NEXT_PUBLIC) is correct, it seems something related to Nextjs
No description
Nathan
Nathan•2w ago
yep, this should say (Remote). it looks like there's a bug in our frontend, that should definitely not be NEXT_PUBLIC_
rbravo
rbravoOP•2w ago
Oh, I just removed the NEXTPUBLIC And it works now haha
Nathan
Nathan•2w ago
ok great, we'll get that fixed. thanks for reporting
jog1t
jog1t•2w ago
thanks for reporting, the fix is now on prod 🎉
rbravo
rbravoOP•2w ago
Awesome! @Nathan, I'm building a WhatsApp Business SaaS platform (similar to WhatsApp Web - already have customers and I'm building an extension of the product) using Rivet Actors (with Rivet Cloud) and I'd love a few tips... Architecture: - Each WhatsApp conversation = 1 actor (identified by phoneNumberId:customerPhone) - Actors maintain: messages array (100-1k messages), metadata, active WebSocket connections - CF Workers receive webhooks → publish to Rivet → actors broadcast to connected clients - Expected scale: 1k-10k conversations, ~100 msgs/sec peak, 1k concurrent WebSockets A few questions: Q1: Cross-Actor Queries - How to "list all conversations"? Since each conversation is an isolated actor, how should I implement: - List all conversations for a business phone number, sorted by lastMessageAt - Filter by unread count, labels, assigned agent, etc. - Search across conversations Should I: - Create a separate "ConversationRegistry" actor that maintains an index? - Use an external database for this index layer? - Is there a Rivet pattern for querying/listing actors by metadata? Q2: Storage Strategy - Best way to store thousands of messages per actor? What's recommended for storing 1k-10k messages per actor using KV storage? Option A: Single key with all messages await kv.set('messages', allMessages); // 1-10MB array Option B: Partition by pages await kv.set('messages:page:0', messages[0:50]); await kv.set('messages:page:1', messages[51:100]); // ...Option C: Hybrid (recent in memory, old in KV) Are there any size limit per actor that I should be worried about?
jog1t
jog1t•2w ago
Q1: Cross-Actor Queries - How to "list all conversations"? Create a separate "ConversationRegistry" actor that maintains an index. That way it would be instant lookup, as it will be the closest to the data source. Q2: Storage Strategy - Best way to store thousands of messages per actor? Option C: Hybrid (recent in memory, old in KV), we're planning to support sqlite in the near feature
Nathan
Nathan•2w ago
^ +1 on Q1. this is called the "supervisor" pattern in actor systems. for unread/last seen, you can have the chat thread actor update the conversation registry actor. we have some docs on actor-actor communication Q2: option B is best for chat log storage. our kv storage is sorted which makes it easy to chunk storage. there is no size limit, we have a hybrid system that'll handle what's loaded in the actor. like jog1t siad we'll have sqlite soon which will make this even easier. fyi – we haven't exposed a kv api yet for actors, only c.state. did you see something in the docs that implied otherwise?
Nathan
Nathan•2w ago
@rbravo fyi – we wrote up a document on this https://www.rivet.dev/docs/actors/design-patterns/#coordinator-and-data-actors
Rivet
Design Patterns - Rivet
Common patterns and anti-patterns for building scalable actor systems.

Did you find this page helpful?