MicroWebSrv2 : Server is too slow



  • Hello, I am using a Wipy(Firmware 1.20.1.r2):
    I created a server with MicroWebSrv2 from jzic.
    My settings are:

    • procStackSize=8*1024
      The same as mws2.SetEmbeddedConfig()
    ConnQueueCapacity       = 8
    BufferSlotsCount        = 16
    BufferSlotSize          = 1024
    KeepAllocBufferSlots    = True
    MaxRequestContentLength = 16*1024 
    

    When , I go in the website, i just asking 2 jsons files every 10 secs , but with the time flying, the responses make too much time to come.
    If somebody here have a solution, or a better configuration for the Wipy.
    :)



  • @jcaron said in MicroWebSrv2 : Server is too slow:

    polling
    Are the files you are requesting static files (I suppose not) dynamically generated one the fly?
    The files are generated .
    Are you using TLS?
    No
    Is your WiFi not on a congested channel?
    Maybe I will try to change channel . thanks .
    Is your WiPy doing anything else at the same time?
    Yes , but even he ' s doing nothing , I found this problem.





  • @ElinhohHD most requests take less than 1 second, which even though not particularly fast, does not seem that slow either.

    Instead of polling I would encourage you to use web sockets instead.

    Are the files you are requesting static files (I suppose not) or dynamically generated one the fly? If the latter, are you sure it’s not your code which is slow?

    Are you using TLS? This adds quite a bit of latency to set up connections, though this would probably appear in a different part of the timings. Are you compressing the data returned?

    Is your WiFi not on a congested channel?

    Is your WiPy doing anything else at the same time? There are probably things which may block processing of other threads.

    The first thing I would probably do would be to add logs on the WiPy with high precision timestamps to see where exactly things take time.



  • Dear @ElinhohHD,

    can you create an issue on the upstream repository [1] to outline your observations?

    With kind regards,
    Andreas.

    [1] https://github.com/jczic/MicroWebSrv2



  • requetes2.png requetes.png

    every 15 sec the client asking to the server some files.



  • @andreas No , i have this problem using Squirell or Dragonfly OS, but with the official version(1.20.1.r2) my Wipy restart for nothing.



  • Dear @ElinhohHD,

    thanks for writing in. We are also using MicroWebSrv2 within our Terkin Datalogger. Are you sure the device doesn't panic while requesting data? That might well contribute to the observation it is responding slowly while there's actually a reboot in between.

    With kind regards,
    Andreas.



  • @ElinhohHD What size are the files? If you use a browser, what does the timeline/waterfall display in the developer tools say in terms of where the time is spent for each request? How are you doing the requests? Manually clicking on a link? Automatically via scripts? Are you sure your script does what it should?


Log in to reply
 

Pycom on Twitter