I have embedded the chat in a WordPress template. It works well, but my users are complaining of unexpected timeouts when using the chat. I have seen it myself once or twice. I posted a message, then my next message, only a few seconds later, did not go through and I got a timeout. I don't know if the situation would improve with more users but it is definitely an issue when there are 2 users in the chat.
This is my current configuration:
- Code: Select all
global $current_user;
get_currentuserinfo();
require_once dirname(__FILE__)."/../../../phpfreechat-1.5/src/phpfreechat.class.php"; // adjust to your own path
$params["serverid"] = md5(__FILE__ . $_SERVER['REQUEST_URI']); //make it per-page so that live is different from test
$params["nick"] = $current_user->display_name; // it can be useful to take nicks from a database
$params["max_nick_len"] = 250;
$params["frozen_nick"] = true;
$params["server_script_url"] = $_SERVER['REQUEST_URI'];
$params["title"] = "ScotPCG Member Chat";
$params["channels"] = array("The Clay Den");
$params["isadmin"] = is_super_admin($user_id);
$params["theme"] = "blune";
$params["max_privmsg"] = 8;
$params["height"] = "400px";
$params["max_msg"] = 20;
$chat = new phpFreeChat($params);
As you can see, I did not set the timeout param, so it should be picking up the default. I don't think the issue is to do with the actual timeout anyway as it can happen in a few seconds, not 35 seconds.
Are there any php/server-related configuration changes that I can make or look at to prevent these timeouts from happening? If I can't fix it, I will have to look elsewhere for a chat :/
Thanks.