N
N
Nikita Rubinkovskiy2018-07-13 02:12:53
PHP
Nikita Rubinkovskiy, 2018-07-13 02:12:53

Why does a 504 error occur when updating a record in the database?

Hello.
I'm trying to update in a database write cycle in a Laravel project. The code is as follows:
for ($i = 0; $i <= (count($replace)-1); $i++) {
$edit_art = Article::find(97 + $i);
$edit_art->article = $replace[$i];
$edit_art->update();
}
This causes a "504 Gateway Time-out" error, and no entries are updated.
What could be the reason?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question