Nikola Posted October 30, 2007 Report Share Posted October 30, 2007 We are currently testing new version ( 2.1.0.2115 ) on linux debian and we have a problem. Access to the database using SOAP is very slow comparing to the old version. For example simple php script like I am attaching, takes exactly 2 minutes to return the results, while on the old version, it was taking 1-2 seconds. Userportal we are using for managing voicemail, forwarding etc. doesn't even load (probably because of the time out) Once again, on the old version (3.1-2.0.4.1766) it takes seconds to return these results. Thanks, Nikola php script for getting first and last name from pbxnsip if the phone numberis is given. $r = array(); $search = array("name"=>$phone_number); pbx_search("user_alias", 999999, 0, false, $search, $r, $pbx_server, $pbx_port); $alias_id = array_pop($r); if($alias_id) { $r = array(); $search = array("user", "domain"); pbx_get("user_alias", $alias_id, $search, $r, $pbx_server, $pbx_port); $user_id = $r['user']; $domain_id = $r['domain']; } else { echo "No User Found."; } $columns = array("id"); pbx_get("users", $user_id, $columns, $res, $pbx_server, $pbx_port); $extension_id = $res['id']; $columns = array("first_name", "display_name"); pbx_get("extensions", $extension_id, $columns, $res, $pbx_server, $pbx_port); echo "<br />First name: ".$res['first_name']; echo "<br />Last name: ".$res['display_name']; Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 30, 2007 Report Share Posted October 30, 2007 Is your web client re-using the HTTP connection? Every time the client opens a new HTTP connection the PBX hits the break. There is a setting in pbx.xml called "http_rate" which tells how many new HTTP connection the PBX should accept per second. If you increase this value, the speed should go up - but also the risk of DoS the PBX through HTTP storms. Quote Link to comment Share on other sites More sharing options...
Nikola Posted October 30, 2007 Author Report Share Posted October 30, 2007 I don't know how to reuse HTTP connection. Anyways, that is not the problem, since we are just testing the new version, so nobody except me is accessing the server. Also, i measured again, and every time it needs exactly 2 minutes to return results (this script). I also tried increasing http_rate, but there is no difference. What should I try next? Thanks, Nikola Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 31, 2007 Report Share Posted October 31, 2007 Oh that is very slow - probably the TCP connection just times out. The good news is that the server obviously does keep the connection alive. I think the easiest is to get an Wireshark trace and check if there is a HTTP interop problem. Quote Link to comment Share on other sites More sharing options...
Marijn Rispens Posted August 5, 2008 Report Share Posted August 5, 2008 Hello We've just installed version 2.1.12.2489 (Win32) on a brand new server. Specs are saying that the system resources are far above minimal. But even though a simple script like the one below takes a good 30 seconds. Example from: http://wiki.pbxnsip.com/index.php/Access_to_the_Database $columns = array( 0=>"first", 1=>"name", 2=>"number"); pbx_get( "adrbook", 2, $columns, $result_set ); print_r( $result_set ); Thanx! Quote Link to comment Share on other sites More sharing options...
Marijn Rispens Posted August 11, 2008 Report Share Posted August 11, 2008 I've just solved the problem by changing the "HTTP/1.1" protocol to: "HTTP/1.0" Quote Link to comment Share on other sites More sharing options...
Kaj.Noppen Posted September 23, 2009 Report Share Posted September 23, 2009 I've just solved the problem by changing the "HTTP/1.1" protocol to: "HTTP/1.0" Could someone with acces to the wiki / support site please update this, took me some good time to find this solution... If it was put on the wiki correctly, the php script on the server work almost directly. Also, if this person could make it possible to download the files, in stead of copying them, it would be a lot more easy. Also, the php on the wiki is malformed and has some small errors. 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.
Note: Your post will require moderator approval before it will be visible.