Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

Must close client window and re-open on server restart #43

Closed
petrocket opened this issue May 8, 2013 · 2 comments
Closed

Must close client window and re-open on server restart #43

petrocket opened this issue May 8, 2013 · 2 comments

Comments

@petrocket
Copy link

For some reason when I update my server code and the meteor server restarts, the only way for me to get file uploads working again is to close my client window and re-open it. Is there some kind of JS thread on the client that is keeping the client from working when the server restarts?

@raix
Copy link

raix commented May 8, 2013

At the moment each collectionFS is handed its own connection to the server (not to block the normal ddp patch traffic) I've had similar issue with reconnecting meteor apps in general - I'm convinced that this will improve. I'm also planning a complete rewrite of the client side code.

Turning off thread behaviour
The queue on the client has some thread like behaviour - This can be overwritten by:

_queueCollectionFS.spawns = 0; //0 = we dont spawn into "threads", 1..n = we spawn multiple "threads"

Should be set before initializing collectionFS
If you want you can have a look at: https://github.com/raix/Meteor-CollectionFS/blob/master/collectionFS_client.js#L24

Assign Meteor default connection to the queue
You can try to set the collectionFS connection back to the default Meteor connection:

_queueCollectionFS.connection = Meteor.default_connection;

I dont think it would solve the issue, but for the sake of debugging

After server boot - if client is not reconnecting
In console you can try:

Meteor.reconnect();

This will reconnect the default Meteor connection - if this solves the issue then its a Meteor issue - Well, Bleeding edge :)

Some quick intro, I'll try to confirm issue in a week or two - would be nice to know if Meteor is clever enough to reconnect all client connections or if focus is only on default_connection.

Regz. RaiX

@raix raix closed this as completed Oct 10, 2013
@raix
Copy link

raix commented Oct 10, 2013

Im closing this, if its still an issue let me know

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants