On Jun 13, 12:18 am, "[email protected]" <[email protected]>
wrote:

> Oveek, have a look at this commit:
>
> http://github.com/tiddlyweb/tiddlyweb/commit/8c3c8371718df8275350b3c3...
>
> and install Tiddlyweb 0.9.39 (just released) and see if that changes
> the behavior at all.

Disregard what I said about the strange behavior. This commit looks to
be working perfectly, and in only 4 lines! I was originally confused
because I was still seeing multiple instances of the StoreSet being
initialized, but I was overlooking that one will be initialized for
each apache process as you mentioned below. I can verify the Store is
initialized only once per process, and the connection pool is being
reused. Also looks like the default pool size is 10, and not 5. When
there are a bunch of simultaneous requests, the numbers of connections
grows to accommodate them, then falls back to 10 connections once the
requests complete.

By the way, I've actually been running directly out of git. I pulled
in your commit, and in my tests never I encountered the
InvalidRequestError you mention in your following post. I don't know
where that would be coming from.

> discovered that the StoreSet middleware is only initialized once per
> process, but every time __call__ is called a new Store is created. So
> I changed it so only one is created.

> What this should do is make sure only one sqlstore is created per
> process, and is reused per request, which means that the connection
> pool is reused.

Nice work, this appears to be working as intended. Connection pool is
definitely being reused. I'm going to do more testing tomorrow, but I
think you've nailed it. Again, that error in 0.9.39 is strange because
running against current git master I'm not having any problems.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to