phyphox Forums

Full Version: Possible bug with multiple fetch?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I sit on a windows 10 machine.
I am doing multiple 'basic' get with '|acc_time' in Postman and using curl. Works fine every time.

But when i use Node.Js ( tested the following: node-fetch, axios, native etc) and in the same code (with proper async/await) hit the same url multiple times ( also tried with 5sec delay), the first request goes ok, the second and so on error with ECONNRESET. 

I have also tested similar setting with C#/Java. Similar story ( little different error messages but deep down there socket hang up :-)

I can do multiple accX=full requests and so on without error. I have looked at the master branch for the Java remote server and cant see any specific reason.

Please, tell me that i am missing something obvious :-)

Best regards
Sounds odd. Since the main difference seems to be that you are using properly threaded code in your non-working example, I could imagine that your code is running too efficient. A thing to know about the web server implementation in phyphox is that it is not multi-threaded. This in particular means that the phyphox web server will not handle any request until the previous connection has been closed. On most simple implementations this is not a problem and typical parallel requests from webbrowsers are patient and wait until their requests are being handled.

So, my first theory would be that your proper implementation sends a request just when the last one has been closed but before the poor phone had the time to open back up for business. Just a first thought, but without aby node.js experience or the code I cannot really say more... On the other hand it is weird that the full requests come through just fine.
Hello again

And thanx for the fast response! Yes it could be something like that, first i suspected that i was doing something wrong in node.js, therefore i tested with the other language.

Yes 2, the full request works, even in loop upto 5 times. Havent tested with more. I have to investigate some more, at least i now know that i am on the track at least.

Students by the way like you product, it's a great way to make them program/do datahandling/timeseries/fft and so on with real data :-) So keep up the good work.

Best regards