darickc / MMM-BackgroundSlideshow

MIT License
146 stars 84 forks source link

400 Bad Request - socket.io #21

Closed jdestgermain closed 5 years ago

jdestgermain commented 5 years ago

I am attempting to use this with my Synology NAS where I have ~55000 photos stored.

I am getting a 400 Bad Request for a socket.io request. I am not sure how to diagnose this further, though, as I am not super experienced with Chrome Developer tools.

I am thinking that perhaps because it takes so long to recursively find the files throughout the folders the request is timing out or something?

I can get it to work fine by just choosing a single folder but that isn't ideal at all--I want this to be a digital photo frame that I can restart occasionally to grab new files automatically from the NAS.

WebSocket connection to 'ws://0.0.0.0:8080/socket.io/?EIO=3&transport=websocket&sid=o2JqpgdUAqwvTqN0AAAH' failed: WebSocket is closed before the connection is established. Failed to load resource: the server responded with a status of 400 (Bad Request) : http://0.0.0.0:8080/socket.io/?EIO=3&transport=polling&t=MWWn7p3&sid=KtC2IMJJcINV7FWsAAAA

jdestgermain commented 5 years ago

This socket.io issue maybe seems relevant as the session id is what I see for response...but not sure how I could configure a max_fails for MagicMirror or specifically this module, if it's actually down to the module level.

https://github.com/socketio/socket.io/issues/1739

darickc commented 5 years ago

55000 photos as a lot. I wouldn't expect it to perform very well with that many. Especially if you are shuffling them. Perhaps a better approach would be to split them up into smaller folders and periodically switch folders in the config.