MWS "Network Error"

Now that I have MWS installed, the first thing I’ve tried to do is import my main wiki into it - but it keeps failing. In fairness my wiki is pretty large (~ 20,000 tiddlers) but if there’s anything I can do to fix it, please let me know. Looking at my console there’s no note other than it just kicks back to regular command prompt. I get this message in the wiki itself.

If you were returned to the command prompt, then the server crashed or otherwise exited. So the wiki in the browser can no longer connect to the server.

There is probably some errors or exception messages in the command prompt which would be useful for developers investigating the issue.

Another place to look for errors is in the browser console log. In Firefox you would hit F12 to open the Developer Tools - but I have no idea for other browsers.

1 Like

I’m trying it again this morning. Below is a screenshot of both the console and chrome console area. There’s no note on the command prompt side, only in the browser. I did notice today that if in the console I just run npm start again that it seems to pick up roughly where it left off and runs for a bit more until it stops again. As I mentioned this wiki is 20,000+ tiddlers, I’ve re-started it a bunch of times and I’m still in 2023 means I have a lot more restarting to do.

Heads up, I’ve been getting this message near constantly too, on my MWS servers – doesn’t seem to matter how many mbs of bags are included.

I’ve been meaning to bring it up, it’s not breaking but it’s annoying.

Checking back in here - is there anything more I can do to help debug this? I just generated a test .json with 9999 tiddlers for testing purposes and when I tried to import them it worked it crashed at 43 (of 9999).

Attached are logs from my windows terminal, screenshot of browser debug, screenshot of error popup, and then sample .json (note9999.json) and then tiddler used to generate tiddlers (create.json)

Thanks! I look forward to seeing if this can be resolved, because right now I can’t really import anything into MWS.

Windows Terminal

In Wiki Message
network-error

Browser Console Log

Test import file
note9999.json (1.1 MB)

Test import file generating tiddler
Create.json (330 Bytes)

Well it took me almost 20 minutes to import about 9000 of them. It didn’t crash at all. In a server environment I would expect it to be on a task runner which would immediately restart it if it stops, but that’s not always going to be the case, so we’re certainly trying to make this as resilient as possible. Restarting the server manually should also allow it to continue.

Opening a new transaction every time is probably the main reason for it taking so long. I think I probably need to batch updates so we can save the whole thing in one transaction.

Hi @stobot

Could it be a Firewall/antivirus/whatever security software blocking the connections because it considers them as an attack? The import process could look like a Denial of Service attempt.

Just a guess,

Fred

It appears to just be the fact that it’s saving them one tiddler at a time, and unlike Node TiddlyWiki, MWS actually waits until the change is saved to disk before returning the request. Node TiddlyWiki maintains a server-side memory cache, and returns the request as soon as the tiddler is saved in the memory cache, so the next request can start immediately.

I think I just need to have it save tiddlers in a batch rather than via individual requests.

1 Like

Good to hear, thanks for the follow-up. My actual wikis tend to range in the 10000 to 30000 range, so that sounds very helpful!

Thanks for getting back @Arlen22 . It’s definitely not an ideal message to be interfering all the time, but within the realm of tolerance I have for pushing toward the sql transition

It really is not supposed to be crashing at all. I’m not sure what exactly the mechanisms are that might cause a crash. I suppose there could be something where the server listener somehow silently stops listening, and then nothing is there to prevent the process from exiting. It’s not supposed to just be silently exiting like that. Can you let me know what version you’re using?

It’s been a while since I updated, as I’ve made several modifications I’m still waiting for the release-version to adopt – moving items between bags, for example.

I had thought that it might be something I did that caused the problem, but since @stobot is having the same problem, it’s possible I was wrong in that original assumption.