BoneCP datasource opens many threads to manage the connections in application - bonecp

BoneCP datasource opens many threads to manage the connections. Is there a way where it opens only single thread for all the datasources opened?
Daemon Thread [com.google.common.base.internal.Finalizer] (Running)
Daemon Thread [BoneCP-keep-alive-scheduler] (Running)
Daemon Thread [BoneCP-pool-watch-thread] (Running)

Related

iis process serving application pool exceeded time limits during shut down

Recently, some of my IIS application is having no response. I check the event log and found that some
error happened in WAS service which cause some application pool to be stopped.
The following is the error message.
I can see only the process id causing
the problem.
I checked the error and find in one apppool a process is exceeded time limits during shut down.
Is that possible the process cannot shutdown and cause the other apppool to shutdown. My solutions is set the Test_pool application pool timeout to 1440 minutes(24 hour) and set recylcing time at a specific time
of the day to avoid the shutdown failure of process and prevent the auto shutdown of application pool. Is that workable?
A process serving application pool 'CEHL_POOL' exceeded time limits during shut down. The process id was '529004'.
A worker process '504596' serving application pool 'TEST_POOL' failed to stop a listener channel for protocol 'http' in the allotted time. The data field contains the error number.
A worker process with process id of '794136' serving application pool 'TEST_POOL' was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed.
Application pool 'TEST_POOL' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
Application pool 'DefaultAppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
The event logs included mutiple errors with different application pool. So please point out which application pool stop responding. The error message "exceeded time limits during shut down" means the application failed to finish all current requests inside the process before application pool shutdown timeout reached. So either threads hang up or locked up.
“being automatically disabled due to a series of failures。。。”is caused by rapid failure protection, so you need to check application events and you should be able to find the crash event.
No matter crash or hang, you need to reproduce the issue and monitor the request status inside worker process monitor. It will show the time taken and current handler. You may need to collect and analyze dump file to trace the root cause.
Besides, in some case, http.sys will cause this issue because it is no longer able to wake up a new appliction pool. You may need to check whether your application pool is able to be waked up after your application stop responding.

If a process is waiting on a semaphore does os allocate it cpu?

I am working on a windows system. I have a main thread from which I start few threads.The new threads do the processing.Now my main thread waits on WaitForMultipleObjects(). So is my main thread also allocated cpu on regular interval?Or as it is on wait the other threads share cpu?
(Slightly different) Duplicate: Does WaitForSingleObject give up a thread's time slice?
"[No] -- the thread is blocked until whatever it's waiting on becomes signaled. The thread won't be scheduled to run while it's blocked, so other threads get all the CPU time."

IIS 7 Application Pool work process life and Session life

In IIS7 Application Pool there is a setting Idle-time out default is 20 min,
which says:
Amount of time(in minutes) a worker process will remain idle before it shuts down, A worker process is idle if it is not processing requests and no new requests are received.
My question is, if the worker process shut down because of the time-out time, does the session created by application which is hosted in this worker process get lost?
Yes -- the session data is tied to the app pool worker process, so once the worker gets shut down, the session data is lost.
The default behavior is to store session variables in the memory space of the ASP.NET worker process.
(Of course, this assumes you're using InProc as the session mode. If you're using the database, then it will persist after the worker gets shut down.)

How to handle application shutdown in Quartz.Net

I have used Quartz.Net for queuing and sending emails from my application. I don't know how each scheduled job responds to application instance stopping, pausing or shutting down. The IJob interface has no method that can notify a running job about these events.
My question is how can I handle these cases when they occur so that the job can exit while leaving the application and the data in a stable state?
Make sure you call IScheduler.Shutdown(true) when your application shuts down. This will wait for all jobs to finish and ensure everything is cleaned up correctly.

ASP.NET web garden - max worker threads

I'm investigating some performance improvements that can be made to our web server and ASP.NET application. This page contains a few things that we can do.
We currently have two worker processes running as a garden. Do each of these worker processes have their own ASP.NET threadpool? Or do both of these worker processes share a single threadpool and the max number of worker threads is shared across these processes?
This post seems to suggest that the two processes share a common ASP.NET threadpool.
All w3wp.exe threads do is take
requests from HTTP.SYS queue, process
it, and hand the request to
ASPNET_ISAPI.DLL, who then deposits
those requests into the ASP.Net
request queue, and the ASP.Net threads
service that queue.
But this post suggests that each worker process contains their own ASP.NET threadpool.
Each process (w3wp.exe) has its own
CLR thread pool which has the
configured maxworkerthreads value (20
default).
Which is correct?
Each worker process will have its own thread pool and separate ASP.NET request queue.
Processes can't really share threads, threads run in the context of a single process.

Resources