I run a Java EE application on openshift with a Tomcat 7 server, and using neo4j in embedded mode for the persistance layer. I am using the openshift free plan for now. Every now and then, the application stops, and i get a 503 error. I suspect they pause the gear if the application is inactive for some time, but the application never restarts properly.
I have logged in using ssh and inspected the logs in Tomcat, but found no errors. I suspect that neo4j does not get to call shutdown, but i guess it should still recover.
Any ideas? What should i inspect?
It the application isn't receiving any external requests for 48 hours it will then get idled. However the application will automatically be restarted once an external request is made. Also since you're using java and your database on small gear, check to make sure you aren't hitting any memory limits (https://www.openshift.com/kb/kb-e1082-how-to-check-for-memory-limit-violations).
Related
We have hosted our java application in Linux server. We developed an java application using Spring Boot framework where we have used postgresql 9.5.15 as database. Java,tomcat and postgresql are installed in the linux server. We deployed our war file in the linux server. Initially the application runs fine and as time passes by the application gets slower. We checked the resources at that time and found out that some time cpu usage becomes high and other resources are normal. Also sometime outgoing traffic exceed 8 Mbps . The form load and other process get slower. Once the tomcat is restarted, then everything comes to normal. Application again becomes faster. We are unable to find out the problem. Is there any tomcat setting that can make our application run faster. Cpu usage graph is shown below:.
Our Java application is going through migration from a WAS 7 server to a WAS 8.5 server - and for some reason, even though our application shows as Deployed in our Admin Console, the application itself isn't coming up on our assigned URL.
I've ruled out the possibility of a code-related problem by testing the application in my local server, so I know the problem is with some server settings - but, almost all of my experience in CS is in coding, and I don't know how to figure out where those settings have gone awry.
What options do I have to debug my application's server-side issues?
You don't specify what you mean by "coming up," so I'll start with the broad suggestions.
A couple things to sanity check:
Ensure the application has been deployed on the specific server you are trying to access it on. It's common to have multiple servers all in one cell controlled by one deployment manager, and applications can be deployed to only some of those servers. In the admin console, under Servers -> WebSphere application servers you can find the server you expect it to be on and check Installed applications.
Check to see if the application itself has started. It's possible the server has been started, but not the application. In Applications -> WebSphere enterprise applications, look for the green arrow next to your application.
If you're trying to access a servlet, make sure the context-root of your web module is set to what you expect. In the application's configuration page, it's in Context Root for Web Modules under Web Module Properties.
If all of those seem correct, or if the application is stopped and won't start, check the server logs in your profile's logs directory, especially the SystemOut.log and the ffdc folder. It may be that an error is occuring when you go to access it, or when it is starting up. Those should appear there.
If your application uses EJBs at a version less than 3.1, the EJBDeploy tool must have been run against your application either before deployment, or as part of the deployment process. If you are expecting the latter to occur, ensure the EJBDeploy tool was installed alongside WebSphere on the target system.
If all of that fails, you may way to break out the debugger (if that's allowed in your environment) and see if your code is even being reached.
Check Server Logs: in WAS Console you can find the logs of your server.
Debug in local server. By deploying an ear in your local server, you can then start the server in loggin mode. Then you shuld stop and restart your websphere aplication and it will be stoped in selected breakpoints.
I'm trying to allow a web application running on Linux Ubuntu 10.04.4 and WildFly 9 to access files on a windows share using the JCIFS library ( https://jcifs.samba.org/ ). When testing Samba connections in isolation from the rest of our web application and not using WildFly everything seems to work ok.
The issue is if the connection fails when connecting from the WildFly container - the wildfly processing jumps to 100% CPU, and stays there. As of now this is 12 hours # 100% CPU on our test system - so it's not timing out, if indeed something should be.
Using JCIFS in isolation from our webapp and Wildfly the protocol, authentication and file not found exceptions are caught and logged and it does not cause the java process to consume loads of CPU like the other scenario.
If anyone has any advise regarding their own experience or approaches to troubleshooting I could take I would be very grateful.
Deployed WildFly Websocket application OPENSHIFT . Everything was going good . But Sometime Websocket is not working properly. Then again Everytime i am logging in Openshift Site and Restarting the application. After that it's working fine. After sometime again websocket is not working . Please help me to solve this. How to keep the application always live in OPENSHIFT ??
You might try checking for Memory Limit Violations (https://help.openshift.com/hc/en-us/articles/202399600-How-to-check-for-memory-limit-violations). If you are using small gears you might be running out of memory, your application may require a medium or large gear to work properly. Especially if you are running WildFly + a database on the same gear. Also keep in mind that the JVM is allocated 1/2 of the available gear memory by default, you can read more about that here (https://developers.openshift.com/en/wildfly-jvm-memory.html)
Currently I'm supporting a web application project where every time there's a production deployment, we have to restart the Application Server. I ask my colleague why and he said, deployment takes a lot of memory therefore restart is to avoid outOfMemory and PermGen error. I also found out that JBoss AS, we also doing the same - have to restart after deployment. In Tomcat, we stop the app server then do the deployment and then restart the app server.
Is it by standard Webpshere and JBoss or any other Java Application Server have to restart after deployment?
Thank you.
No, this is by no way a standard. A redeployment may mean some time offline when the old code is taken offline and updated, but having to restart the complete server is normally no must.