GlassFish: WARNING: GRIZZLY0023: Interrupting idle Thread - glassfish-3

I'm seeing this error spewing in my log file for Glassfish 3.1.2.2:
[#|2019-01-18T18:52:34.603+0000|WARNING|glassfish3.1.2|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=36;_ThreadName=Thread-2;|GRIZZLY0023: Interrupting idle Thread: http-thread-pool-8080(1).|#]
I understand that I have a runaway thread but it looks like glassfish is not correctly killing that thread. Because when I do a jstack I still see the stuck thread. I saw in other StackOverflow posts that people suggest disabling the request timeout, but I don't want to disable this check because I need to be able to recover from runaway thread.
I know GlassFish 3.1.2.2 is old but I need this application to run until we have the resources to port/convert it into another environment.
I'm hoping its as easy as patch a few jar files and restart the server. Any help would be greatly appreciated.
Thanks!

Related

Website stops responding

It stops responding after a few seconds of being idle. I have to restart it every time this happens.
I have tried putting startMode="AlwaysRunning" into my applicationHost config, but nothing changed.
The output of the console is just a bunch of
The thread X has exited with code 0 (0x0).
I don't think this is related to idleTimeOut either, because the website completely stops responding; it just hangs.
applicationHost if anyone is interested (too large to post here):
http://pastebin.com/quVMXPHP
Let me know if you need further information.
Are you sure it's from being idle? By default, every time you stop debugging, IIS Express unloads the website, and quits entirely if there's no other websites running. You can disable this by unchecking Enable Edit and Continue in the project properties under the "Web" tab.
If it happens more randomly, then IIS Express may actually be crashing. Check in the notification area of the taskbar for IIS Express, make sure it's there, and (by right-clicking) ensure your web project is still loaded (in the list). If it's actually crashing, you most likely have a memory leak, infinite loop, or something similar going on somewhere in your application that's overloading the process. There's no much we can do to help you with that, without being able to examine your entire codebase. You'll just have to trace and profile until you find it.

Activator `.sbt.ivy.lock` is not available

I am trying to generate Eclipse and IDEA projects for a play project using activator. When I tried doing this, it does a little, but then it hangs at:
Waiting for lock on C:\Users\James\.ivy2\.sbt.ivy.lock to be available...
At first I thought my running session of Intellij IDEA may be conflicting, I killed IDEA and the issue persisted. I closed activator, deleted the lock file, and restarted activator, but then it recreated the lock file and gave me the same issue. This is the full log I have been getting.
[info] Loading project definition from C:\Users\James\play-java\project
[info] Set current project to play-java (in build file:/C:/Users/James/play-java/)
[info] Applying State transformations com.typesafe.sbtrc.SetupSbtChild from C:/Users/James/.sbt/boot/scala-2.10.2/com.typesafe.sbtrc/sbt-rc-probe-0-13/1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1/sbt-rc-probe-0-13-1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1.jar;C:/Users/James/.sbt/boot/scala-2.10.2/com.typesafe.sbtrc/sbt-rc-probe-0-13/1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1/sbt-rc-props-1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1.jar
[info] Updating {file:/C:/Users/James/play-java/}root...
Waiting for lock on C:\Users\James\.ivy2\.sbt.ivy.lock to be available...
How can I fix the lockfile issue?
The .sbt.ivy.lock file is used to synchronize access to your local ivy2 repository between several processes so they cannot modify the directory simultaneously. Usually the situation that you described happens when you have an IDE and Activator/sbt terminal running at the same time.
Even though you killed the Idea Process there could be another process spawned which was causing the lock so next time make sure that you kill all Java processes. However, the best solution for this issue is to avoid locking one process with another. So run only one process which uses the ivy2 repository at the same time.
If nothing works, the last step is to kill the .lock file.
I faced a similar issue, I was also getting the same error
Waiting for lock on C:\Users\ajain9\.ivy2\.sbt.ivy.lock to be available...
Then finally the issue was that there was another sbt process running on my system, and because of that the .sbt.ivy.lock file was not being available. As explained well by Daniel, lock file is used for synchronization purpose.
Once the previous process ended,I did not face this error again.
mac users, just do ps -ef | grep -i sbt, and kill the process

Spring boot web context (AnnotationConfigEmbeddedWebApplicationContext)- suddenly being closed/shutdown

I'm using spring-boot 1.1.3 running a web application (obviously, based on spring-web, security and more) with an embedded Tomcat.
I'm running my application on Linux (Ubuntu) machine with Java 1.7.
After couple of hours, I can see that the context is being closed without a reason. Just to make it clear, the process didn't crash and is still running, when I try to post/get a request, the client just hangs.
I'm using logback, configure with debug level as TRACE and I can not see who or why is close context is invoked.
Can someone please tell me how to detect the trigger for closing the context?
Actualy, the issue was not related directly to spring-boot but I wont change it's tag since other people might face the same scenario.
So, the unswer is the same for, How can I close a terminal without killing the command running in it?
just run your command with & at the end and than, execute disown.

DLL deployment increases startup time of Sitecore site

We have a Sitecore 6.6 instance which is used to host multiple sites. It is hosted in IIS 7.5. We developed custom Sitecore sublayouts and pipelines which are used across websites.
When any dll is deployed in bin folder, the Sitecore site takes long time to startup (8-10 mins). But when IIS is reset, startup time is less (30-40 seconds).
What could be the reason for application startup time to be more for DLL deployment than IIS Reset ?
Any suggestions to improve the application startup time for DLL deployment ?
Update 1: The startup time after DLL deployment impacts our build process as it increases the overall build deployment time in all environments (DEV,STG,LIVE).
Profiling snapshot of w3wp process revealed two major hotspots:
Sitecore.Threading.Semaphore.P
Sitecore.IO.FileWatcher.Worker
Update 2: After following the deployment suggested by Vicent, profiling snapshot of w3wp process revealed major hotspot at
Sitecore.Web.UI.WebControls.Sublayout.GetUserControl(Page)
Further analysis of memory dump showed that thread was waiting for JIT compilation of newly deployed DLL.
For me, it's like your problem is not the start up of sitecore, but the shutdown.
When you copy your dll, the filewatcher detects the change in the bin folder (write it to the logs) and tries to shutdown sitecore (log this too), but if sitecore has tasks running on different threads, (indexing, publishing, scheduled tasks, etc), the semaphore will wait until the other threads finish normally.
That's why when you "kill" the process without waiting for threads to finish sitecore starts up quickly.
I've this behaviour in my environments too, so when i need a quick restart, i copy the dll, wait for a few seconds so at least sitecore tries to shutdown and then and i kill the w3p.exe related to my pool. I won't advice nobody to do this, but i don't have any way to "kindly" kill the threads... Maybe somebody knows how to "force shutdown nicely..."
This blog post by Alex Shyba has some interesting pointers to improve the startup time for Sitecore (but might not be applicable if you're talking about a live environment rather than a DEV environment).
It might also be worth checking your prefetch caches and running through the Performance Tuning Guide if you haven't done that yet.
I've seen this problem before. It happened on version 6.5, but I've not seen a fix for it in the release notes since then.
Sitecore Support has a hotfix for this - it was indeed related to something with their Filesystem watcher tasks. You would need to raise a ticket with them, to get the hotfix or additional information.
My support ticket reference for this issue is 370593. The hotfix has issue 323775. If you mention this in your support ticket, it should speed up the process a bit - if it is indeed the same issue you're experiencing.

ASP.NET 2.0 application never loads

I have an application that runs perfectly fine locally using the VS 2010 application server, however, when I deploy to our web app machine startup just spins and spins and never loads. We have other apps on this same machine that load just fine (this is a debug deployment of same app in product).
I have been spinning my wheels on this for days and I am at a loss as the problem could be.
Here is what I did
Create a new directory (same level as other apps)
Copied over our existing test (www.domain/test/) and it works fine
Build and publish new debug app (www.domain/test/) and it just spins trying to load first form.
I know the diretory is "working" as the 'test' application I put there works fine.
If it's killing the App pool, you might get something in the event log. Fiddler (www.fiddlertool.com) is great http debug tool which let you see if you're in a redirect loop. Also Firefox shows a more meaningful error, something about exceeding the max redirect count.
It does sound like something is looping, but not quick enough to cause a stack overflow, which is odd, because you'd expect it to fail every time.
Simon
Do you have the ability to remote desktop into the machine? If so try running process explorer and look at the process details for the worker process that is giving you issues. Definitely look at the TCP connections being created. If your processor is pegged at 100%, and memory usage is rising then you probably have an endless loop running.
It sounds like it's more related to IIS than ASP.NET. What about the identity that the website is running under? Is it possible that the user the site's running under a bad user, or maybe the password needs to be re-entered?
I did a quick Bing search
There are a lot of postings regarding the error message you described above. Most if not all point to code in your app that is crashing. I know I had a similar problem when I used an automated/threaded daemon utility in my web application. Make sure your code is not bringing down the server, sometimes the VS2010 web server is a little more foregiving than an actual IIS deployment.
If that doesn't work try running a Remote Debugging Session to try and catch any errors being thrown but not handled.
Lastly you could try to setup a new local IIS server to see if you have the same problems. Scott Gu has a nice article about using IIS Express to do this.

Resources