kuvera Posted February 1, 2007 Share Posted February 1, 2007 Hello, I have a php program on its dedicated server, but it works very slowly even on the localhost. I need your help to find out where the problem is. The server has 1 GB ram, Ubuntu Edgy, Apache 2.0.55, php 5.1.6, mysql 5.0.24a-9, php-mysql 5.0.24a-9. The program uses Adodb library, but phpMyAdmin is just as slow, so the problem is elsewhere. There is no update to php mysql client for Edgy. In my.cnf the settings are more than I actually need: skip-name-resolve key_buffer = 16M max_allowed_packet = 16M thread_stack = 128K thread_cache_size = 8 query_cache_limit = 2M query_cache_size = 50M query_cache_type = 1 I made a test query, medium complicated. On my windows test machine it takes 0.5-1 sec to execute. On linux mysql console 0.26 sec. But from PMA and from the program it's about 13 sec when not cached. So I suspect php-mysql connection problems. But how do I solve this? TIA Quote Link to comment Share on other sites More sharing options...
artacus Posted February 1, 2007 Share Posted February 1, 2007 I've had this problem when connecting to a MS SQL server where it took 10 - 20 seconds to establish the connection, but never for MySQL. I don't know what would solve your problem. But try running your query from mysql console, once connecting to the local socket and once connected to the TCP/IP port, see if there's a difference there. Quote Link to comment Share on other sites More sharing options...
kuvera Posted February 1, 2007 Author Share Posted February 1, 2007 Could you please explain to me how this is done? All I know is how to start mysql console: mysql -u... -p Or to use PMA on the localhost. Quote Link to comment Share on other sites More sharing options...
artacus Posted February 1, 2007 Share Posted February 1, 2007 mysql -h localhost will force it to use the tcp/ip port instead of the socket. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.