FreiChat related discussions
Videochat not connecting anymore after upgrade

Hi there,

I recently upgraded from version 9.6 to 10.0. Before the upgrade I was able to make a video connection (chrome to chrome, both laptops in home wifi network). This did take some trying. I mostly had to try three or four times to make it work. When a connection was made, this happened one or two seconds after the 'Connecting...' message showed.

After the upgrade I managed to get a connection only once, right after the upgrade. Since then I did not manage to make it work. It shows the screen 'Connecting..', on both laptops, and keeps stuck there. I wait for about 10 to 15 seconds. If I wait longer, my site goes down due to reaching the limits of resource usage (see this post: http://codologic.com/forum/index.php?u=/topic/1714/high-resource-usage-videochat-during-connecting-and-during-connection). This is what I tried:

  • Home wifi network, two laptops, chrome to chrome, and firefox to chrome (latest versions)

  • Home network to some other network, two laptops, chrome to chrome.

Chrome version 39.0.2171.99 m
Firefox version 34.0.5

Any ideas on why a connection cannot be made?

Greets,

Jeroen

Hi there, I recently upgraded from version 9.6 to 10.0. Before the upgrade I was able to make a video connection (chrome to chrome, both laptops in home wifi network). This did take some trying. I mostly had to try three or four times to make it work. When a connection was made, this happened one or two seconds after the 'Connecting...' message showed. After the upgrade I managed to get a connection only once, right after the upgrade. Since then I did not manage to make it work. It shows the screen 'Connecting..', on both laptops, and keeps stuck there. I wait for about 10 to 15 seconds. If I wait longer, my site goes down due to reaching the limits of resource usage (see this post: http://codologic.com/forum/index.php?u=/topic/1714/high-resource-usage-videochat-during-connecting-and-during-connection). This is what I tried: - Home wifi network, two laptops, chrome to chrome, and firefox to chrome (latest versions) - Home network to some other network, two laptops, chrome to chrome. Chrome version 39.0.2171.99 m Firefox version 34.0.5 Any ideas on why a connection cannot be made? Greets, Jeroen

Hi,

How did you upgrade freichat ?
Try doing a fresh install.

Do you see any errors in the browser error console ?

Hi, How did you upgrade freichat ? Try doing a fresh install. Do you see any errors in the browser error console ?
edited Jan 21 '15 at 3:58 pm

Hello Adesh,

I did the upgrade manually. Which means I copied all new files from version 10.0, and added my own code, which I added before in version 9.6. And changed some things, so that the groupchat code functioned.

However, the directory /freichat/client/plugins/videochat/ has not changed, that is version 10.0, without any of my code. If I change it back to version 9.6, it still doesn't work.

I thought I was not getting an error before. Now I am noticing I am getting a 508 loop detected error. Although I am not sure if that is the reason the connection fails:

 GET http://www.mydomain.com/freichat/server/freichat.php?freimod…stom_mesg=I+am+available&long_poll=true&in_room=-1&custom_gst_name=jeroen1 508 (Loop Detected)main.php:339
send  main.php:339
v.extend.ajax  main.php:339
v.(anonymous function)  main.php:339
v.extend.getJSON  main.php:2570 
FreiChat.get_messages  main.php:2293
FreiChat.yourfunction  main.php:2280
loopme

If I check freichat.js, the following is the same, before and after upgrade:

    var loopme = function()
    {
        if (FreiChat.SendMesgTimeOut >= (freidefines.SET.chatspeed))
        {
            FreiChat.SendMesgTimeOut = 0;
            FreiChat.yourfunction();
        }
        else
        {
            FreiChat.SendMesgTimeOut = FreiChat.SendMesgTimeOut + 1000;
        }
        if (FreiChat.c == null)
        {
            FreiChat.c = setInterval(loopme, 1000);
        }
    };

    loopme();
Hello Adesh, I did the upgrade manually. Which means I copied all new files from version 10.0, and added my own code, which I added before in version 9.6. And changed some things, so that the groupchat code functioned. However, the directory /freichat/client/plugins/videochat/ has not changed, that is version 10.0, without any of my code. If I change it back to version 9.6, it still doesn't work. I thought I was not getting an error before. Now I am noticing I am getting a 508 loop detected error. Although I am not sure if that is the reason the connection fails: ```` GET http://www.mydomain.com/freichat/server/freichat.php?freimod…stom_mesg=I+am+available&long_poll=true&in_room=-1&custom_gst_name=jeroen1 508 (Loop Detected)main.php:339 send main.php:339 v.extend.ajax main.php:339 v.(anonymous function) main.php:339 v.extend.getJSON main.php:2570 FreiChat.get_messages main.php:2293 FreiChat.yourfunction main.php:2280 loopme ```` If I check freichat.js, the following is the same, before and after upgrade: ```` var loopme = function() { if (FreiChat.SendMesgTimeOut >= (freidefines.SET.chatspeed)) { FreiChat.SendMesgTimeOut = 0; FreiChat.yourfunction(); } else { FreiChat.SendMesgTimeOut = FreiChat.SendMesgTimeOut + 1000; } if (FreiChat.c == null) { FreiChat.c = setInterval(loopme, 1000); } }; loopme(); ````
edited Jan 22 '15 at 3:20 pm

I am getting more. The loop error in my previous post was shown in the website window. If I check the console in the videochat window, I see the following (in this case, it was stuck at 'waiting for connection to be established with the peer..', and not at 'connecting..' )

54c114c37802c.png

The other side showed this in console:

54c114dbed3e1.png

I am getting more. The loop error in my previous post was shown in the website window. If I check the console in the videochat window, I see the following (in this case, it was stuck at 'waiting for connection to be established with the peer..', and not at 'connecting..' ) ![54c114c37802c.png](serve/attachment&path=54c114c37802c.png) The other side showed this in console: ![54c114dbed3e1.png](serve/attachment&path=54c114dbed3e1.png)
edited Jan 22 '15 at 3:19 pm

Well the good news is that it is the same error message each time. On both sides requests for 'post_video' as well as 'get_video' are sent alternating. So first 'post_video', then 'get_video', with a few seconds interval. One of these requests gets a 508 loop detected error, and the connection can not be made. The loop error sometimes happens with the 'post_video' request, and sometimes with the 'get_video' request.

Well the good news is that it is the same error message each time. On both sides requests for 'post_video' as well as 'get_video' are sent alternating. So first 'post_video', then 'get_video', with a few seconds interval. One of these requests gets a 508 loop detected error, and the connection can not be made. The loop error sometimes happens with the 'post_video' request, and sometimes with the 'get_video' request.

I most probably have the cause.

After upgrading, I was using up more resources. I noticed that in CPU usage. However, also the number of Entry Processes used went up. I have a Shared Hosting account, and developing a site. I am using two users to test Freichat.

Each time I was getting the 508 infinite loop error, it was at a moment that the limit of Entry Processes was reached (20). I asked my hosting provider if there was a link, but he said that it had nothing to do with eachother. However, now I found multiple sites stating that a 508 is returned when the limit is reached. For instance cPanel:

http://cpanel.net/setting_the_right_limits_for_efficient_shared_hosting_operations/
"ENTRY PROCESSES (Concurrent Connections) Limits the number of concurrent connections and cron jobs that an account can have at any one time.
Each time someone connects to Apache, a connection is used up. There are a limited number of slots in Apache web server for these connections (specified by MaxClients). It is set to 150 by default but often increased to 1000 or more on shared hosting servers. While connections are quickly served for static pages, dynamic pages take their time.
CPU throttling can cause such pages to take even longer to serve, tying up even more slots. Once all slots are used up, apache will not serve any new requests until existing requests are processed, bringing the whole server down. To prevent this issue we added another parameter that limits the number of concurrent connections a site can have. The default is 20. If a site has more than 20 concurrent connections to dynamic pages any further request will receive a 508 error (resource limit reached.)"

Guess I need to upgrade. Happy though, that this is probably it, and I do not need to find an infinite loop.

I most probably have the cause. After upgrading, I was using up more resources. I noticed that in CPU usage. However, also the number of Entry Processes used went up. I have a Shared Hosting account, and developing a site. I am using two users to test Freichat. Each time I was getting the 508 infinite loop error, it was at a moment that the limit of Entry Processes was reached (20). I asked my hosting provider if there was a link, but he said that it had nothing to do with eachother. However, now I found multiple sites stating that a 508 is returned when the limit is reached. For instance cPanel: http://cpanel.net/setting_the_right_limits_for_efficient_shared_hosting_operations/ "ENTRY PROCESSES (Concurrent Connections) Limits the number of concurrent connections and cron jobs that an account can have at any one time. Each time someone connects to Apache, a connection is used up. There are a limited number of slots in Apache web server for these connections (specified by MaxClients). It is set to 150 by default but often increased to 1000 or more on shared hosting servers. While connections are quickly served for static pages, dynamic pages take their time. CPU throttling can cause such pages to take even longer to serve, tying up even more slots. Once all slots are used up, apache will not serve any new requests until existing requests are processed, bringing the whole server down. To prevent this issue we added another parameter that limits the number of concurrent connections a site can have. **The default is 20. If a site has more than 20 concurrent connections to dynamic pages any further request will receive a 508 error (resource limit reached.)**" Guess I need to upgrade. Happy though, that this is probably it, and I do not need to find an infinite loop.

Hi,

We will have to debug this problem.
Can you provide us your website url with two test accounts via email ?
Also include a reference to this post.

Hi, We will have to debug this problem. Can you provide us your website url with two test accounts via email ? Also include a reference to this post.
edited Jan 25 '15 at 11:48 am

I upgraded to VPS, and now it works fine. 2GB RAM, 2 users, chrome to chrome.

I did not receive any errors anymore, and the videochat works as expected.

Greets

I upgraded to VPS, and now it works fine. 2GB RAM, 2 users, chrome to chrome. I did not receive any errors anymore, and the videochat works as expected. Greets
324
9
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft