D
D
Dmitry2020-06-16 11:30:56
cloudflare
Dmitry, 2020-06-16 11:30:56

How to execute a heavy php script if the site is connected to the cloudflare service?

Connected to cloudflare site. It is necessary to execute a loaded php script that performs more than 15 thousand queries to mysql and downloads a large number of pictures (such synchronization). But 20 seconds after running the script, cloudflare simply blocks it (Error 524 A timeout occurred).
Can you please tell me how to execute the script? Maybe you can exclude individual scripts from cloudflare?

The script is located in the /admin/script.php folder.
In the cloudflare itself, in the Page Rules section, I set the following settings:
DOMAIN/admin*
Security Level: High, Cache Level: Bypass, Disable Apps, Disable Performance
The Development Mode is also enabled, but this did not help.
At the same time, on the hosting itself, to execute the script, there is enough memory and power.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2020-06-16
@Stalker_RED

The dumbest way is to add something like

ignore_user_abort(true);
set_time_limit(0);

But it's really better, as Ivan Shumov advises , to reconsider the approach itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question