I have rewritten the below based on the answers.
I have a website that causes HIGH CPU issues on the database server to the point where the server becomes unavailable. Recycling the app pool fixes the issue. According to the server administrator http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a...
I want a long-running process to return its progress over a Queue (or something similar) which I will feed to a progress bar dialog. I also need the result when the process is completed. A test example here fails with a RuntimeError: Queue objects should only be shared between processes through inheritance.
import multiprocessing, time
...
When implementing an elementary data structure like stack, queues, linked list et al.
should I create a resource pool(of nodes) by dynamically allocating memory in bunch or should I allocate memory separately every time I need a node?
...
When using iocp in a job/task pool to provide fast worker wake ups what is the best way to minimise the overhead of signalling the port - ie not having to do it every queue operation?
void Worker()
{
while(1)
{
for(int spin = 0; spin < 5000; ++spin)
while(queue.Count > 0)
queue.PopFront()();
...
We have an application using an Oracle StoredProc. When the stored proc is upgraded or recompiled from outside of our application, the database connections have to be closed and reopened. Otherwise we get an Oracle Exception ORA-20003.
Until now, we were using a WebLogic specific solution, where we were throwing a specific Exception and...
How would I write a generic InternPool<T> in Java? Does it need a Internable interface?
String in Java has interning capabilities; I want to intern classes like BigDecimal and Account.
...
First, I apologize the title is so vague. Its hard to explain what I want to accomplish. Anyhow, I want to build a template that requires a pool of nodes (Content Type A) to be presented along side the main content of a page (Content Type B). This Content Type A could be seen as a box if you like. As you create a new page (Content Type B...
Hello to all, i wonder what the difference between these two ?
Thanks.
...
I tried to declare a memory pool in my class.
But the compiler shows some basic error like missing ')' before ';'
or syntax error : 'sizeof'
It works well if I used the pool as local variable but I really want to make it live with the class.
What's wrong about my usage?
Here is the class, the MAX_OBJ is a const
class CData
{
publi...
Is it somehow possible to use boost::object_pool<>::construct with non const references?
The following snippet doesn't compile (VS2010):
foo::foo(bar & b)
{
}
static boost::shared_ptr<foo> foo::create(bar & b)
{
return boost::shared_ptr<foo>(foo_pool.construct(b),
boost::bind(& boost::object_pool<foo>::destroy, & foo_pool, _1));...
Dear All,
After I read SQLAlchemy's FAQ I think below code may works,
import sqlalchemy.pool as pool
import sqlite3 as sqlite3
conn_proxy = pool.manage(sqlite3)
# then connect normally
connection = conn_proxy.connect(...)
however I also get below snippets:
engine = create_engine(...)
conn = engine.connect()
conn.co...
Hi,
we are hosting a WCF service inside IIS 6. A ServiceHostFactory creates the ServiceHost when the first request to a service appears. In the OnOpening() Method of the ServiceHost, we load some data into a cache implemented as a static property.
Since loading the data takes about 1 minute we do not want the "first user of the day" t...
Hi,
My application is built with apache and runs on windows. I am creating a Thread using the createThread() and then for each thread executing the below :
ap_run_sub_req( subrequest );
ap_rflush( subrequest );
ap_destroy_sub_req( subrequest );
The ap_destroy_sub_request in turn calls apr_pool_destroy() function.
The ap_run_...
I wrote simple web site crowler with threadpool. The problem is: then crawler is get all over site it must finish, but in real it wait for something in the end,and script dont finished, why this happend?
from Queue import Queue
from threading import Thread
import sys
from urllib import urlopen
from BeautifulSoup import BeautifulSoup, S...
I have a default website set up at the root in IIS6 so that when I go to http://mydomain.com, I hit that site.
I would like to set up a different site under http://mydomain.com/othersite.
Is this feasible at all? And if so, how?
I tried different combinations but could not get that to work. Also, I would like to have a different appli...
Hi, how good this python code ? need criticism)
there is a error in this code, some times script do print "ALL WAIT - CAN FINISH!"
and freeze (no more actions are happend..) but i can't find reason why this happend?
site crawler with threadpool:
import sys
from urllib import urlopen
from BeautifulSoup import BeautifulSoup, SoupStrainer...
I'm trying to extend the Clojure language to extend ACI-guaranteed refs to ACID-guaranteed drefs (durable refs). The API is to simply to call (dref key value), where key is a String of the key to be used in the underlying data store (BDB JE in my current implementation), and value is the Object that the dref should be initialized to. I...
Have run into a bug with glibc's malloc(): http://sourceware.org/bugzilla/show_bug.cgi?id=4349 and am thinking a work around for now until updating to later version of glibc is to do pooled allocation for small objects that have many instances coming and going.
The small objects are all derived from an abstract base class. I'd like to ...
I'm using python 2.7, and trying to run some CPU heavy tasks in their own processes. I would like to be able to send messages back to the parent process to keep it informed of the current status of the process. The multiprocessing Queue seems perfect for this but I can't figure out how to get it work.
So, this is my basic working exampl...
Hello. I'm developing application in Java which connects to different web-servers via HTTP protocol (sends them request and waits for response). I would like to use pattern with queue and worker pool, so I'd like to know if there any frameworks in Java providing methods for this?
...