Skip to main content

#18 Time out on Cloudflare

Posted in ‘NorrCompetition’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information (available for public)

PHP version
7.4.33

Latest post by b2z on Tuesday, 06 December 2022 13:11 EET

nerry

Hello there,

I integrated Cloudflare on my site. Everything seems fine.

But when i click on the red heart button to make a vote, i get a 524 error due on timeout issue. Seems that it's caused by your script.

Could you kindly take a look : https://www.widill.com/3-votre-repas-prefere-offert

 

I also got a touch with my hosting, here is their response:

.................................................................. START ..............................................................

I checked the domain widill.com and it is using Cloudflare:
widill.com.        172800    IN    NS    etta.ns.cloudflare.com
widill.com.        172800    IN    NS    albert.ns.cloudflare.com
widill.com.        300    IN    A    104.26.5.227
widill.com.        300    IN    A    104.26.4.227
widill.com.        300    IN    A    172.67.71.89

Error 524 indicates that Cloudflare successfully connected to the origin web server, but the origin did not provide an HTTP response before the default 100 second connection timed out

This also explains the high CPU usage as the process is running for more than 100 seconds without being completed successfully.

I then checked the website and it is built with Joomla

I straced what is happening after it I click on a heart and found the following the process and found the following:


[pid 43745]      0.000063 connect(15, {sa_family=AF_INET, sin_port=htons(465), sin_addr=inet_addr("104.26.4.227")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 43745]      0.000211 poll([{fd=15, events=POLLIN|POLLOUT|POLLERR|POLLHUP}], 1, 300000 <unfinished ...>
[pid 43743]      0.150943 <... restart_syscall resumed> ) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      0.000070 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000075 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432261, 916417000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000198 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000069 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432266, 916674000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000173 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000062 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432271, 916919000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000214 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000114 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432276, 917244000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000181 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000068 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432281, 917495000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000201 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000057 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432286, 917754000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000215 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000056 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432291, 918025000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000182 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000069 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432296, 918268000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000160 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000072 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432301, 918497000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000168 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000073 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432306, 918737000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000229 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000094 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432311, 919057000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000148 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000057 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432316, 919277000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000182 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000069 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432321, 919524000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000221 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000098 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432326, 919823000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000151 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000101 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432331, 920085000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000179 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000058 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432336, 920335000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000169 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000057 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432341, 920560000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000179 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000096 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432346, 920810000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000171 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000059 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432351, 921067000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000844 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000156 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432356, 922017000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000140 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000071 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432361, 922269000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
[pid 43743]      5.000212 futex(0x27b2478, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 43743]      0.000101 futex(0x27b2504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {1668432366, 922573000}, ffffffff) = -1 ETIMEDOUT (Connection timed out)

After I clicked on a heart, the site tried to connect to external IP: 104.26.4.227 but that connection failed.

I am not sure if you are familiar with this IP or why the site is trying to connect to it, but if you are not then I can recommend you to check with a web developer to examine the process further.

Best Regards,

.................................................................................................. END ............................................................................

Please note that I cannot give access for live site that runs on Cloudflare (widill.com). But have a test site too if needed (not integrated with Clouflare).

Best regards

 

sulpher

Hi Nolly,

I have examined your site and noticed the following behavior:

when I click on Vote button, no vote assigned and nothing happens - I see no error in console, but after 5-7 seconds a modal window appears with the information "Vous avez aimé un article en magasin? Vous aussi gagnez-le grâce au Vote Concours. ". And a new URL opens in a new browser tab (no connection with the server, so it is empty). And this effect repeats each time. This is not part of our product. There should not be modal window appearance or opening another tab when you click on Vote, such a functionality is not designed in NorrCompetition.

So, I have to ask:

  • Did you customize the component?

 

As for Cloudflare: try to disable some options inside this service to check out will it impact on the situation.

Also there is Fingerprint.js library inside the component which helps to protect the voting contest from fraud votes, so I assume this library detects Cloudflare connection as a fraud. Try to disable Fingerprint.js checking in NorrCompetition options and see what will happen.

 

Best regards,
Eugene

b2z

Hello,

A timeout occurred Error code 524 happens not only with our script, but also with a rstbox plugin script.

index.php?option=com_ajax&plugin=rstbox&format=raw&task=trackevent&box=14&event=open

So it's some kind of common error for AJAX requests.

But as Eugene said - try first to disable "Fingerprint" and "Tracking Data" in contest options.

Best regards,

Dmitrijs

b2z

Hello!

Have you managed to resolve your issue?

Best regards,

Dmitrijs

nerry

Hello there,

I got a touch with some developer to set cloudflare and fix 524 error, but it's still  petering out.
The issue is still happening even if i disable IP/Fingerprint/Cookies check, and tracking data.

Please note that i did not customize voting action, but i set popup in Engagebox component that opens on voting action (code is set in Engagebox, not in Norrcompetition).

I disabled the popup for now on voting action, but still does not work.

I reached Siteground support again, here is their response:

........................................................................................................................ START .........................................................................................................

After making a system trace we found out that the application makes several connection attempts to IP addresses that belong to Cloudflare (the ones marked in bold). Here is an example:

''[pid 68479]      0.000055 connect(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "2606:4700:3108::ac42:2ad9", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EADDRNOTAVAIL (Cannot assign requested address)

[pid 68479]      0.000069 connect(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "2606:4700:3108::ac42:2927", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EADDRNOTAVAIL (Cannot assign requested address)''

We cannot be certain of how or why the redirect occurs but judging by the results, we can tell that a component of the Joomla instance is attempting to connect to Cloudflare IP addresses and this is when the issue occurs.

The issue at hand might be due to cached content that needs cleaning or leftovers of old code that should be updated, however, we cannot determine exactly what setting would need changing.

Our recommendation for you is to contact the website's developer, so they can establish exactly why the application is making these requests. They should be able to identify and leftovers that requires cleaning.

...............................................................................................................................................END..................................................................................................................

Also, i found out that in your last release you added this feature:
- Improved: Added CloudFlare IPs check
I suppose that this is linked to the issue. 
However, i cannot see the such feature from Joomla Backend. Is there a way to handle this on the site? For instance, disable Cloudflare IPs checking, set Cloudflare IPs range, edit some php files... or something?


Best regards

b2z

Hello,

Added CloudFlare IPs check

That's only check for getenv('HTTP_CF_CONNECTING_IP') nothing more.

The issue is still happening even if i disable IP/Fingerprint/Cookies check, and tracking data.

That's mean that IP check is not executed, so it is not related to CloudFlare IPs check.

Anyway - as a developer I can ensure that the component by itself does not perform any external connections in the code.

By the way "A timeout occurred Error code 524" just happened for me when I was trying to access your website...

b2z

I advice you to create a copy of your website on subdomain without Cloudflare and test it for issue.

Support information

Support hours: You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+3), but not limited. Our staff is pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days.


Our time: / Your time:

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. We also ask you to remove temporary credentials at your site after the problem is resolved. Thank you.

Support of free extensions is not provided on this forum. Please submit your questions or report issues via Github tracker. See link on the product page.