Loading...
 
Skip to main content

Architecture / Installation


Persistent Connections

posts: 34 Canada

Hello,

I was wondering how to setup Tiki for persistent database connections?

Would i just set php.ini to allow persistent connections (using mysql.allow_persistent On directive) and then my tiki installation would automatically detect this and use mysql_pconnect, or would i have to change all appearances in the code of mysql_connect to mysql_pconnect and remove all appearances of mysql_close?

Also, if it does detect it automatically, would i have to setup php.ini to allow persistent connections before the install, or would it also work afterwards?

Also, i'm keeping a log of setting up and doing some primitive benchmarking of Tiki with PHP/Apache and MySQL on separate servers and if it's useful i could add it to the TikiBoosting page. Would it be useful?

Any help would be appreciated.

posts: 2881 United Kingdom

Yo,

I wouldnt like to use persisant connections 😑 As not everyone allows the session cookies! You could be spiraling down to server failure. I think this was battled out recently in #tikipro on irc. And basically from what I read, it was bad, very bad for high demand sites

in terms of making it happen you would need to modify the connect or maybe see if the adodb drivers have a persistant connection available.

posts: 34 Canada

Hello Damian,

Thank you for your reply, it was very helpful. If i were to avoid using persistent connections, do you think it would still be advantageous to have PHP/Apache and MySQL installed on separate servers? I was thinking this would help with the load but maybe the increased time to connect to the database for each query would negate this effect?

thanks again.

> Damian:
> Yo,
>
> I wouldnt like to use persisant connections 😑 As not everyone allows the session cookies! You could be spiraling down to server failure. I think this was battled out recently in #tikipro on irc. And basically from what I read, it was bad, very bad for high demand sites
>
> in terms of making it happen you would need to modify the connect or maybe see if the adodb drivers have a persistant connection available.
>
>

posts: 2881 United Kingdom

> superdude:
> Hello Damian,
>
> Thank you for your reply, it was very helpful. If i were to avoid using persistent connections, do you think it would still be advantageous to have PHP/Apache and MySQL installed on separate servers? I was thinking this would help with the load but maybe the increased time to connect to the database for each query would negate this effect?
>

Im not sure, I have 4 webservers in at my Data Centre currently all with mysql running on itself (localhost) but never played with setting up a dedicated database server/webserver. Maybe something I could play with on a rainy afternoon...... damn its sunny outside at the moment 😉

Damian

posts: 34 Canada

Ok yup, thank you anyways. Enjoy the sun! 😎

> Damian:
> > superdude:
> > Hello Damian,
> >
> > Thank you for your reply, it was very helpful. If i were to avoid using persistent connections, do you think it would still be advantageous to have PHP/Apache and MySQL installed on separate servers? I was thinking this would help with the load but maybe the increased time to connect to the database for each query would negate this effect?
> >
>
> Im not sure, I have 4 webservers in at my Data Centre currently all with mysql running on itself (localhost) but never played with setting up a dedicated database server/webserver. Maybe something I could play with on a rainy afternoon...... damn its sunny outside at the moment 😉
>
> Damian


posts: 34 Canada

Hello Damian,

Thank you for your reply, it was very helpful. If i were to avoid using persistent connections, do you think it would still be advantageous to have PHP/Apache and MySQL installed on separate servers? I was thinking this would help with the load but maybe the increased time to connect to the database for each query would negate this effect?

thanks again.

> Damian:
> Yo,
>
> I wouldnt like to use persisant connections 😑 As not everyone allows the session cookies! You could be spiraling down to server failure. I think this was battled out recently in #tikipro on irc. And basically from what I read, it was bad, very bad for high demand sites
>
> in terms of making it happen you would need to modify the connect or maybe see if the adodb drivers have a persistant connection available.
>
>

posts: 2881 United Kingdom

> superdude:
> Hello Damian,
>
> Thank you for your reply, it was very helpful. If i were to avoid using persistent connections, do you think it would still be advantageous to have PHP/Apache and MySQL installed on separate servers? I was thinking this would help with the load but maybe the increased time to connect to the database for each query would negate this effect?
>

Im not sure, I have 4 webservers in at my Data Centre currently all with mysql running on itself (localhost) but never played with setting up a dedicated database server/webserver. Maybe something I could play with on a rainy afternoon...... damn its sunny outside at the moment 😉

Damian

posts: 34 Canada

Ok yup, thank you anyways. Enjoy the sun! 😎

> Damian:
> > superdude:
> > Hello Damian,
> >
> > Thank you for your reply, it was very helpful. If i were to avoid using persistent connections, do you think it would still be advantageous to have PHP/Apache and MySQL installed on separate servers? I was thinking this would help with the load but maybe the increased time to connect to the database for each query would negate this effect?
> >
>
> Im not sure, I have 4 webservers in at my Data Centre currently all with mysql running on itself (localhost) but never played with setting up a dedicated database server/webserver. Maybe something I could play with on a rainy afternoon...... damn its sunny outside at the moment 😉
>
> Damian