 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Lukas Smith's Blog: Persistent connections with MSSQL
by Chris Cornutt December 11, 2008 @ 12:01:26
Lukas Smith is looking for a little help on a strange problem he's seeing connecting to a SQL Server with persistent connections:
We are connecting to SQL Server via mssql_pconnect(). MaxChilds is set to 256 and we are only establishing one connection per request. So as a result I am expecting a maximum of 256 established connections. A client went into production yesterday and due to a missing index the server ended up being insanely loaded, as the queries started to block each other. The sysadmin checked the state of things via netstat and found that there were close to 500 tcp connections to the SQL Server. What gives?
He checked FreeTDS and the MaxRequestsPerChild settings to ensure that nothing there could have caused the problem, but hasn't found any hints so far. If he can't solve it right away, he also wonders if there's a way to kill idle connections if they're not used in a certain amount of time.
There's already one connect that mentions a similar issue but with Oracle connections, also on RHEL, but no definitive answers so far.
voice your opinion now!
persistent connection mssql mssqlpconnect tcp problem freetds
Maggie Nelson's Blog: To persist or not to persist?
by Chris Cornutt August 22, 2008 @ 11:18:12
On her blog, Objectively Oriented, Maggie Nelson looks at a topic she was debating for a new application - whether or not to use persistent connections to her database.
There's a connection already waiting for you. Yay, right? Well, with MySQL, connecting is actually really really cheap, and frankly, if you are using persistent connections, you might encounter some issues with Apache going zombie on processes that use a connection, effectively taking that connection out of use. Grrr.
She did some research on the topic but found contradicting evidence for both sides. Eventually, what her choice boiled down to was this possible issue mentioned by Jay Pipes (of MySQL):
If you use Apache, Apache can zombie a PHP process and cause the mysql connection to be held until the mysql server restarts...
voice your opinion now!
persistent connection database mysql choice
DeveloperTutorials.com: Developing State-enabled Applications With PHP
by Chris Cornutt April 13, 2007 @ 08:55:00
The Developer Tutorial website has a new article posted today about the creation of "state-enabled applications" with PHP. Basically, a chunk of functionality to keep user data persistent throughout the whole time they're on the site.
A major drawback is that while browsing from one page to another, the website does not remember the State of the browsing session. This make interactivity almost impossible. In order to increase interactivity, the developer can use the session handling features of PHP to augment the features of HTTP in order to remember the State of the browsing session.
They look at two solutions - using cookies and using sessions. Cookies are simple enough, but when it comes to sessions, there's actually two different roads to follow: with cookies enabled and without. They have to be handled slightly differently, but both essentially work the same way.
voice your opinion now!
tutorial stateenabled persistent session cookie tutorial stateenabled persistent session cookie
|
Community Events
Don't see your event here? Let us know!
|