Coder Social home page Coder Social logo

Slow response time about mockoon HOT 21 CLOSED

ozzie1998 avatar ozzie1998 commented on May 5, 2024
Slow response time

from mockoon.

Comments (21)

bruce-c-liu avatar bruce-c-liu commented on May 5, 2024 3

Hi, has there been any updates on this? I'm on macOS Catalina. With latency set to 0, a simple GET is taking 6-1500ms (avg 600ms). 😭

Latest Chrome and Postman both have this unstable behavior.

from mockoon.

255kb avatar 255kb commented on May 5, 2024 3

hi @bruce-c-liu
Unfortunately no, we were unable to reproduce this on our setups, nor to find a pattern. We don't get many reports of this issue, and it seems that it's not always the same problem among the reports: random slowness vs 2 seconds slowness on all calls.

from mockoon.

hmalatini avatar hmalatini commented on May 5, 2024 1

I have joined the spectrum chat! We can continue there! Thanks!

from mockoon.

255kb avatar 255kb commented on May 5, 2024

Hi, I just tried with the same payload in a JSON file and it's under 10ms (Windows 10) and pretty stable (6.5ms, 7.5ms, 7.5ms...). Which OS are you using?

from mockoon.

ozzie1998 avatar ozzie1998 commented on May 5, 2024

MacBook Pro early 2011 latest Mac OS

from mockoon.

255kb avatar 255kb commented on May 5, 2024

I tried to reproduce the bug on Sierra 10.13 with your file but I get pretty good results too, between 6 and 30ms.
I am not sure what is affecting the performances. Could you maybe send a screenshot of your environment ?

from mockoon.

ozzie1998 avatar ozzie1998 commented on May 5, 2024

from mockoon.

255kb avatar 255kb commented on May 5, 2024

Sorry to hear that, I honestly don't know what can cause this latency.
I will close as I can't reproduce the bug.
This will / may be reopened when we have more information or a way to reproduce it.

from mockoon.

schidaine avatar schidaine commented on May 5, 2024

I can reproduce on MacOS Mojave. Using short 42 response for a GET /answer, I get a mean at 600ms, from 200ms to 1,5s. Can't explain why so far.

from mockoon.

abiodunjames avatar abiodunjames commented on May 5, 2024

I can reproduce this on MacOS mojave as well. The response time is too slow

from mockoon.

hmalatini avatar hmalatini commented on May 5, 2024

Same here. Few days ago started to response with delay of avg 1 second. OS is Widnows 10

from mockoon.

hmalatini avatar hmalatini commented on May 5, 2024

I fixed it disabling CORS feature. Now it works well. Probably there is something with the performance related with CORS

from mockoon.

255kb avatar 255kb commented on May 5, 2024

Hi @hmalatini
It is strange that disabling CORS feature solved the problem as it basically answers 200 to all OPTIONS calls. Nothing really fancy here.
Also, I was never able to reproduce this or get any setup that allows me to do so. Do you use any third party software that could interfere, like Fiddler?

from mockoon.

hmalatini avatar hmalatini commented on May 5, 2024

@255kb
Yes, it is really weird. But is basically what I did for get responses fast again. I don't use any third party software that can interfere. If I can help you with something, just let me know

from mockoon.

255kb avatar 255kb commented on May 5, 2024

Could you try to reproduce and send me the relevant data (through export menu) if possible. Also, knowing which app/browser you used to call the endpoints would be useful.
Thank you

from mockoon.

hmalatini avatar hmalatini commented on May 5, 2024

Yes, I could reproduce it. In fact, I can realized of something weird. The solution has nothing to do with CORS. I made a video for show the steps that I did for reproduce it, and how I fixed it. Can we talk via email and I can show you what I did? For security reasons, I can't pass the mocked data that I did for test because it is confidentially of my company.
My browser is: Versión 86.0.4240.75 (Build oficial) (64 bits)

from mockoon.

255kb avatar 255kb commented on May 5, 2024

Great! Can you join the chat: https://spectrum.chat/mockoon ? or we can talk by email: [email protected]

from mockoon.

bruce-c-liu avatar bruce-c-liu commented on May 5, 2024

Hmm, that's unfortunate. FYI, restarting the environment at least fixes this issue for about 10 minutes. Then, the problem I had starts happening. Perhaps it's some kind of memory leak.

from mockoon.

255kb avatar 255kb commented on May 5, 2024

While the app may not have the best performances I didn't notice any big memory leak under a normal usage (i.e. connected to a front-end app that perform requests like a normal front-end app 😄 ). Maybe under heavy load? What is you typical usage?

from mockoon.

meinto avatar meinto commented on May 5, 2024

Same problem here. I have an environment with a single POST route. The response time is between 40ms and 1.5 seconds. But response times below 100ms are extremly rare. Mostly they are in a range between 300ms & 1.5s.

I'm on MacOS Catalina.

from mockoon.

255kb avatar 255kb commented on May 5, 2024

@meinto This issue is very strange. We investigate this from time to time and are unable to find a root cause.
However, I found some discussions regarding slowness with NodeJS and DNS resolving on localhost. Have you tried calling the mock API with http://127.0.0.1:port, instead of localhost?

from mockoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.