the connection is being closed unexpectedly
maratsahakyan
HOBBYOP

6 months ago

Subject: Paid Plan – MongoDB Restore Fails Midway (Connection Closed Unexpectedly)

Message:

Hi Railway team,

I'm currently on a paid plan with 8GB storage, and I'm trying to restore a MongoDB database that contains around 10 million documents. The total data size is only 2 GB, so it’s well within the limits of my plan.

When I run mongorestore, the process begins successfully and reports:

scss

CopyEdit

1,661,837 document(s) restored successfully. 0 document(s) failed to restore.

Immediately after that, I receive the following error:

css

CopyEdit

error restoring from .bson: connection(shinkansen.proxy.rlwy.net:55782[-4]) socket was unexpectedly closed: EOF

This suggests the connection to the MongoDB instance is being closed unexpectedly, and only about 1.6 million of the expected 10 million documents are actually restored.

I’ve verified:

  • The BSON file is valid and complete.

  • The total data is only 2 GB.

  • This is not related to local connectivity or data corruption.

Could you please help me understand:

  1. Why the connection is being closed during the restore?

  2. Whether there are any timeouts, resource limits, or proxy constraints causing this?

  3. How I can reliably restore a 2 GB dataset (with ~10M documents) on my current plan?

Thanks in advance for your help.

Best regards,
Marat Sahakyan

$10 Bounty

13 Replies

Railway
BOT

6 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


brody
EMPLOYEE

6 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 6 months ago


maratsahakyan
HOBBYOP

6 months ago

I'm writing to enquire the options to expand my disk space. The reason of failure lies mainly on the insufficient disk capacity. I'd like to learn what's the current disk capacity for my "Hobby" plan.


mateodemuynck
PRO

6 months ago

Hey,

The maximum volume size for hobby plan is 5GB. However it's not that big by default. You need to expand your volume after creating it by Going into it's settings -> Grow slightly_smiling_face emoji


maratsahakyan
HOBBYOP

6 months ago

I was informed that the storage limit should be 5 GB, but I'm not even able to utilize a fraction of that — nowhere near the promised capacity. I’ve attempted multiple restores and consistently hit this limit with no way to increase or manage space from my side.

This issue is preventing me from using your service for even basic functionality, and I see no option other than upgrading to the Pro plan, which feels forced and unreasonable for such a small dataset.

If this limitation is intentional or unavoidable, I will have to stop using this service entirely. Otherwise, please provide a clear and immediate solution.


mateodemuynck
PRO

6 months ago

First of all let me clarify something. I am just a member of the Railway community and uses it for my projects too but i'm not part of the Railway team and juste likes to help on my free time slightly_smiling_face emoji

When you say "No way to increase or manage space from my side" do you mean you already hit the max size for the volume or you can't find the option to resize your volume ?


maratsahakyan
HOBBYOP

6 months ago

Thank you for your response. Just to clarify — my previous comment was directed toward the service itself, not you personally. I do appreciate your assistance.

That said, I’ve already explored the available options for resizing Memory and CPU, and both are currently set to their maximum limits. Unfortunately, there’s no additional setting available to increase storage or resolve the issue on my end, which makes the situation quite limiting.


mateodemuynck
PRO

6 months ago

The option to increase volume size is not inside service's settings but inside volume's settings slightly_smiling_face emoji

Just click your volume, not your service


maratsahakyan
HOBBYOP

6 months ago

Can you guide me? I can't find, where is it located ?


maratsahakyan
HOBBYOP

6 months ago

"Your plan includes up to 8 GB of RAM, 8 vCPU, and 100 GB of Shared Disk. Manage your Plan."

This I copied from the service, I can resize RAM and CPU but the Disk place I haven't seen yet.


mateodemuynck

The option to increase volume size is not inside service's settings but inside volume's settingsJust click your volume, not your service

maratsahakyan
HOBBYOP

6 months ago

slightly_smiling_face emoji


mateodemuynck
PRO

6 months ago

Sorry I was busy here you go slightly_smiling_face emoji

Attachments


maratsahakyan
HOBBYOP

6 months ago

Thanks a lot friend, I did it


mateodemuynck
PRO

6 months ago

Did it fixed your problem ?


Loading...