I have a strange behaviour happening in one of our projects and I wonder if anyone encountered anything similar. It is a legacy Java project and we are using ojdbc6.jar to connect to an Oracle DB. Locally we are using a Tomcat 6 app server.
When using IntelliJ IDE the db connection fails in some cases (specially where higher number or more complicated queries are run), with
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The strange thing is, that Eclipse users never have the mentioned problem. (For some reason, their db calls seem much faster too)
We are using an IBM Websphere JDK because of production reasons, its a 64 bit 1.8 jdk.
The issue happens more often when running debug, but also happens while running normally.
I looked up this error and tried the following things:
monitored the number of processes oracle is running, but we have a limit of 400 and it never went above 300
tried changing locally to ojdbc7 and ojdbc8: 7 produces the same issues, 8 throws a could not establish connection with Network Adapter error at the same situation
tried changing the jdk-s under tomcat: no effect
tried all kinds of memory settings for tomcat and for intellij, no effect
It's a pretty annoying issue and I dont understand, why this does not happen with Eclipse.
Thank you for your advice in advance!
Related
I was wondering if anyone has experienced this problem.
We work with Eclipse 2020-03 running Wildfly 16 and OpenJDK 1.12 on a Windows 10 Desktop connecting the a local instance of SQL Server. When the app server is deployed we connect using Chrome or IE. When I'm debugging the java app, Eclipse becomes unresponsive. It could go 2 or 3 days before this happens and then happen 10 times back to back. It is inconsistent and I cannot determine what I might being doing to cause the issue. I have worked with older versions of Eclipse and have not had this issue till the Luna version. Of course at the same time we moved to Maven and GIT as well.
Some of symptoms
1. Hang when stepping through code.
2. Hang when click away after stopped at a breakpoint and then coming back.
3. Hang when inspecting variables.
4. Hang when increase the display area of one of the variables when its a long String.
If I just run and do not interact with the debug perspective, I have no issue and it never hangs.
Funny thing is we have at least a hundred developers running with this setup and only 2 or 3 of us have had this problem. At least from what I have tried to gather in terms of information.
Things I've tried
1. Complete format and re-install of PC. (I was desparate)
2. Upgraded Eclipse from 2019-03.
3. Based on google searches, turned off mylyn
4. Logged a comment on a issue with Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=322126
5. Reviewed Eclipse, Wildfly and Java logs. Nothing of note.
6. Changes startup parameters of Eclipse with no luck.
7. A few other things I cannot remember.
To recover, I have to terminate the Eclipse process and the terminate the OpenJDK process.
Any help would be appreciated.
My weblogic application server crashing at startup. Today I installed Oracle DB12c database, WEBLOGIC 10.3.6, RCU 11.1.1.6 and SOA generic 11. I created an empty weblogic soa domain, runned setSOADomainEnv.cmd than startWeblogic.cmd but weblogic throws me tons of warning and exceptions like :
java.lang.OutOfMemoryError: GC overhead limit exceeded
Here is the part of the log.
Some warnings here.
I reinstalled it all like 10 times with different JDKs 1.7, 1.6 etc, but still I got the same results.
I am using Windows 7 Professional.
Thank you for your answers.
You might want to try setting up the memory parameters for your JVM.
See: https://community.oracle.com/thread/2600343
Assuming your machine have enough RAM. Do the errors occur when you start the server or when you try to access a UI console (such as /em)?
I am running Apache Tomcat 7.0.42 on Ubuntu 12.04. When I start up Apache initially it's all fine and I can connect. However after using it for a while I can no longer browse to any site hosted on Apache, not even the root site. The browser just waits for a connection forever. If I go on the machine I can see lots of connections that have been closed and are CLOSE_WAIT on netstat, but nothing open. The Apache log file doesn't tell me anything either.
If I restart Apache the problem doesn't go away, even rebooting the server hasn't solved the problem. After struggling for a while it starts working again only to stop shortly afterwards.
I don't have any network issues between the machines.
I had a look at the known bugs on 7, but don't notice anything that sounds related. I have also reinstalled Apache on the machine, but the problem returned soon after.
I feel like I'm missing something silly, but I'm just not getting it.
I am not sure if this will help, but you can give a try for below options.
The problem may not be for Tomcat7, but for your own site. I have used tomcat for so many days and didnt notice such kind of issue single time.
May be your one of the site is having memory leaks and after running for sometime, it makes server stop because of low memory.
If there are many sites then you can try removing all and adding one by one to check which site is giving the issue.
You can try with simple page first by removing all other sites to check if the issue is with tomcat or your site.
We have a Spring 2.0.8 application in production, running on Tomcat 5.5.x and JRE 1.5.x (yeah, I know, we should upgrade, that's not the point now), with Oracle 11g as our choice of DB.
We have upgraded the application some months ago (I'd say July) and have switched from Oracle 10g to Oracle 11g in the past month or so (also changing the Oracle JDBC driver to match the database version).
We've been having serious and unexpected problems in production. As of a day ago, there have been heap space OutOfMemory errors several hours apart. This in turn either slows down response time by about a 100 times, or the users can't connect.
Our setup is:
Windows machine to run the server
Apache 2.2 and Tomcat 5.5 with SSO enabled, total memory: 128MB, max memory: 512MB
Spring 2.0.8 Webapp
Oracle 11g
Since noticing this error, this is what we tried:
checking out the logs - there doesn't seem to be a pattern.
Obviously, logs only tell you when the server is out of memory, so
they show the point of not working anymore, instead of the point
where the problem started
restarting server
reinstalling Tomcat
increasing amount of memory Tomcat can use - this just prolonged the issue, of course Tomcat ate just as much as we gave it
fresh installation of both the server and Apache+Tomcat
generating heap dumps - nothing spectacular seems out of the ordinary, most memory is used for starting up the application
checking the DB - it's fine, quick and responsive, no locks
I'm looking out for ideas on what else to do. We have this same setup in 5 different productions in total, this problematic one being with the smallest number of users and data.
Now that you have figured it out, I recommend that you add the following to the list of things to do REAL SOON:
Upgrade your JVM to Java 7. Java 5 has been "end-of-lifed" which means that you won't be getting any more security patches ... unless you are on an Oracle Java support contract.
If you can't upgrade to Java 7 ... or Java 6, then at least upgrade to the most recent patch release for Java 5 that you can get hold of.
Upgrade to Tomcat 6 or 7, or at least to the most recent Tomcat 5.5.
To head off problems where OutOfMemoryError causes severe slowdowns, make sure that you have the -XX:+UseGCOverheadLimit option on your JVM command line.
And, if you plan to do any significant development work on that system, consider upgrading it to Spring 3.x.
Ok, we figured this one out. It turns out it was a badly written SQL query which was scarcely used. Analyzing the heapdump helped find the objects that were taking up a lot of memory, and we went from there.
As soon I click to start (literally immediately) the tomcat server with my web app, it displays the following error:
http://i67.photobucket.com/albums/h282/jamesekki/error.jpg
What's weird is the application still builds successfully and works fine. The problem is it slows down development time since I get this error every time I need to deploy any changes.
Here is my eclipse ini:
http://i67.photobucket.com/albums/h282/jamesekki/Capture.jpg
Any ideas?
Things I have tried:
1. Increased xms/xmx in increments of 128 megs all the way up to 4 gigs (still fail)
2. Increased permsize/maxpermsize similar to increments above (still fail)
Maybe these will help explain:
http://www.mulesoft.com/tomcat-oome-out-of-memory-error
http://baskarfelix.wordpress.com/2008/08/06/out-of-memory-errorjava-heap-space/
I'd also be curious to know if you have the same issue if you leave Eclipse out of the picture. Create a WAR file, add it to the Tomcat /webapps directory, and start Tomcat using a command shell and the start script in the /bin directory. If you still have a problem, I'd say you should look at how Tomcat and your JVM are configured. If you don't, it tells me that Eclipse is the problem.
Thanks everyone for your inputs. I was able to narrow it down to what was the root cause of the whole issue. I had an external api jar file in the src/main/resources/lib of my services layer and Eclipse seems to not like that for whatever reason. As soon as I moved that out of that location, it resolved the issue. Can anyone explain why this would potentially cause an issue? Just for learning purposes. Thanks!
Your settings look good to me. You could try the long way of profiling [1] tomcat to see what happens on startup, or the crude way of deleting your local server and runtime, to see if it helps with a fresh one. If that fails, re-download latest Eclipse Java EE edition, and set up from scratch.
While it's not the best solution (in case the problem resurfaces, you still have no proper solution), it is sometimes worth it if it takes too long otherwise.
[1] You could profile with JProfiler or YourKit Profiler. Both have trial versions. JVisualVM is also an alternative that comes with the JDK. However it may be an issue if Tomcat crashes immediately.