Performance drop after 5 days running web application, how to spot the bottleneck?

后端 未结 8 2161
滥情空心
滥情空心 2021-02-14 12:46

I\'ve developed a web application using the following tech stack:

  • Java
  • Mysql
  • Scala
  • Play Framework
  • DavMail integration (for cale
相关标签:
8条回答
  • 2021-02-14 12:58

    I agree with tulskiy. On top of that you could also use JMeter if the investigations you will have made with jconsole are unconclusive.

    The probable causes of the performances degradation are threads (that are created but never exit) and also memory leaks: if you allocate more and more memory, before having the OutOfMemoryError, you may encounter some performances degradation (happened to me a few weeks ago).

    0 讨论(0)
  • 2021-02-14 13:04

    Try using VisualVM - you can monitor gc behaviour, memory usage, heap, threads, cpu usage etc. You can use it to connect to a remote VM.

    0 讨论(0)
  • 2021-02-14 13:04

    So guys, in this specific case, I was running play in Developer mode, which makes the compiler works every now and then.

    After changing to production mode, everything was lightning fast and no more problems anymore. But thanks for all the help.

    0 讨论(0)
  • 2021-02-14 13:12

    You might just want to try the 'play status' command, which will list web app state (threads, jobs, etc). This might give you a hint on what's going on.

    0 讨论(0)
  • 2021-02-14 13:17

    Yet another profiler is Yourkit.
    It is commercial, but with trial period (two weeks). Actually, I've firstly tried VisualVM as @axel22 suggested, but our remote server was ssh'ed and we had problems with connecting via VisualVM (not saying that it is impossible, I've just surrendered after a few hours).

    0 讨论(0)
  • 2021-02-14 13:18

    jconsole comes with the JDK and is an easy tool to spot bottlenecks. Connect it to your server, look into memory usage, GC times, take a look at how many threads are alive because it could be that the server creates many threads and they never exit.

    0 讨论(0)
提交回复
热议问题