On Ubuntu 12 server and Tomcat 7, I load test my spring mvc application for one specific REST get method. (using an online load test tool)
For 1 user per second and over a minute it works fine. But when I load test 50 users per second, after a short while tomcat shutsdown, so I have to restart it again. I checked logs but no error was there.
Where can I start to find the problem? Becoming slow, or unresponsive could be something that I could understand, but shuting down dont make sense.
Related
I've kubernetes cluster and My application is working on one pod. My application create some files and it sometimes took over than 5 min. and when it took so long pod create same request. I checked everywhere but actually I don't know how to search this problem it might releated with timeout or some thing like this but I'am sure it is releated with kubernetes. I've tried same application on docker container and I didn't see same problem in there. I'll be greatfull if you anyone help me. (kubernetes version is v1.18.5)
My expectation is get request only one time.
Our application is based on Spring boot(the latest version), everything works as expected after deployed at the server.
However we found that for a certain period(maybe 30 minutes) during which there are no visitors, it will response very slow when you visit the page again. And after the re-first visit, the subsequent requests will response normally. Looks like the embedded tomcat or jvm slept.
What's going on? How to fix that?
For a VAADIN Java Application running on Tomcat7 with Neo4j Database System, i need to create a routine that checks all users everyday at 12AM, and sends email to all of the users who have been returned by my request (the request is ready, and works well).
The problem is here:
I don't know how to start one of my class each day at 12 AM in the application, i already tried Quartz and Java.ejb.Schedule but none of them have worked, Quartz creates me a memory error and only starts the class once, and ajb is simply not working (no loop at all).
Is there an easier way to achieve this? i just need to start my class each day, even if no users are on the application.
I have a grails project with mysql for GORM support. When i start project without mysql running, it gives me series of exception message. This is fine and expected. But, what is problem is that there is no way to handle that so that i can catch them and report to user that there is issue with system and they need to wait till it gets fixed.
There are two cases for this problem.
First one is when a currently running project (deployed inside tomcat and running) get its mysql connection killed by say stopping mysql service. In this case, it keeps on throwing database exception without any grace. The error catching mechanism fails for me. I have mapped 500 to a error page but it also does not gets rendered. Nginx which acts as reverse proxy at last displays its own timeout page.
Second case is when project start loading (say tomcat container is started) and mysql service is already down. In this case, the project startup seems to be effected to a level that startup fails though tomcat reports in log that war is running but when accessed it just throws black page (saying 404) which still is mysterious because i have mapped 404 to a error page which is also not in work.
Thanks.
If there is no db at start up the war will not be loaded into tomcat at all. So you will get default 404 error pages at that point. There are errors thrown to the log in this case but not much else. So your users are hosting their own instances of their app it sounds like, what I like to do is expose a health page.
The health page can be at a known URL and in the case of no db you will get a 404 but you can document that any non 200 status code is an error and provide info on how to fix. Also if you are automating deployment this check is great for reporting status of the deployment.
I am currently developing a web server. I am at a stage where 99% of the work is building the business logic, data logic and running tests. In other words, I have no need for the project to run in tomcat.
Right now, I created a test class that runs a mixture of the current code I am working on and prints info to the console. I have to restart the web server each time I make a change, which wastes a few minutes each time. Then I have to GET the localhost:8080 and wait for the page to load before I can read the printed output to the console.
Is it possible to run a Main type function that simply prints to the console without having to run trough tomcat.