threadpool - http request and thread pool

I have this problem. In order to create a response for a single http request, I have to do several tasks that can be performed concurrently. I can perform those tasks in a Executor (thread pool) but then I have to worry about concurrency (synchronization) in my web app. Is there a better way to solve this problem without using thread pool?Thanks,...Read more

threadpool - Did netty.3.5.7 begin initializing worker pool with 200 threads?

Can anyone confirm if Netty 3.5.7 introduced a change that causes an NIO threadpool of 200 threads to be created?We have a webapp that we're running in Tomcat 7 and I've noticed that at some point there is a new block of 200 NIO threads - all labeled "New I/O Worker #". I've verified that with 3.5.6, this threadpool is not initialized with 200 threads, but only a boss thread. As soon as I replaced the the jar with 3.5.7, I now have 200 NIO threads + the boss thread. If this change was introduced with 3.5.7, is it possible to control the pool ...Read more

threadpool - Controlling number of threads in Mule

I'm using Mule 3.3.1 Community Edition.I have a flow that accepts HTTP requests. This runs successfully.<flow name="TestFlow"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="test" doc:name="HTTP" mimeType="text/plain" encoding="UTF-8"/> <logger level="INFO" category="hello" doc:name="Logger"/></flow>The service needs to be single-threaded so that messages are handled strictly in the order in which they are received. My thought was to set maxThreadsActi...Read more

threadpool - Unstable application uses SqlDependency. Several states and errors

I have a windows application using SqlDependency running at separated thread pool, this application represents a log monitor UI get the latest rows added in a specific table in the database and view it in a DataGridView. You can see the application source code from this LINK, or follow this script. const string tableName = "OutgoingLog"; const string statusMessage = "{0} changes have occurred."; int changeCount = 0; private static DataSet dataToWatch = null; private static SqlConnection connection = null; private static SqlCom...Read more

threadpool - boost::asio io_service stop specific thread

I've got a boost::asio based thread pool running on N threads.It used mainly for IO tasks (DB data storing/retreival). It also launches self-diagnostic timer job to check how 'busy' pool is (calculates ms diff between 'time added' and 'time handler called')So the question is - is there any way to stop M of N threads ( for cases when load is very low and pool does not need so many threads).When the load is high (determined by diagnostic task) then new thread is added:_workers.emplace_back(srv::unique_ptr<srv::thread>(new srv::thread([this]...Read more

threadpool - Using Thread in Sync WireTap

I our application we plan to make wire-tap as Async call but we set some login information in the SecurityContext so if we make wire-tap as Async we will loose this data so we plan to go with the Synch Channel for Wire-tap and in the Interceptor class when we log we call a Thread to log the message in the DB.What may be the impact with this approach is there any Thread poll limit we need to take care or is there any alternative solution for this?We are using weblogic 12c...Read more

threadpool - apache restlet connector overload

I use restlet in camel route in from("restlet:http/myLink") clause. When user's requests more then ten per second, I begin recieve errors processing request like a "org.restlet.engine.connector.Controller runINFO: Connector overload detected. Stop accepting new work"I think, that error is caused by number of threads,request query's size or number,or something like that. I try set to maxThreads param different values in spring config <bean id="restlet" class="org.apache.camel.component.restlet.RestletComponent"> <property name="maxTh...Read more

threadpool - OkHttp: Connection pool and File handles

We use Retrofit/OkHttp3 for all network traffic from our Android application. So far everything seems to run quite smoothly.However, we have now occasionally had our app/process run out of file handles.Android allows for a max of 1024 file handles per processOkHttp will create a new thread for each async callEach thread created this way will (from our observation) be responsible for 3 new file handles (2 pipes and one socket). We were able to debug this exactly, where each dispached async call using .enqueue() will lead to an increase of open ...Read more

threadpool - Python - Running many different types of threads without exhausting resources

I am attempting to do some clean multi-threading but maybe my approach is wrong.I have a BaseFix Thread class with 6 different types of children, one of which is CommandFix Thread, another is ParamFix Thread.Their run functions have different code inside them, but will mostly utilize the subprocess.run function.class CommandFix(BaseFix): def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, verbose=None): super(CommandFix, self).__init__(group=group, target=target, name=name, kw...Read more

threadpool - Submitting Callable to ExecutorService is never completed

The problem which i am facing has been nagging for a week now and here it is:I have a class AdminBlocageBackgroundProcessing.java which processes a CSV file by reading data from it and validating it and storing it in a array list as:public Object call( ) { // TODO Auto-generated method stub try{ data = ImportMetier.extractFromCSV( new String(fichier.getFileData(), "ISO-8859-1"),blocage); } catch (Exception e) { e.printStackTrace(); } return data;}And i am calling it from my action class usin...Read more

threadpool - ScheduledExecutorService: modify one or more running tasks

I have a program, it loads a few tasks from a file prepared by user and start executing them according the scheduling shown in the file.Example: taskFile.txtTask1: run every hourTask2: run every 2 seconds...TaskN: run every monday at 10:00This first part is Ok, i solved by using ScheduledExecutorService and i am very satisfied. The tasks are load and run as they should.Now, let's image that the user, by GUI (at runtime), decides that Task2 should run every minute, and he wants to remove Task3.I cannot find any way to access one specific task in...Read more