A
A
aopil2020-04-15 23:44:13
ubuntu
aopil, 2020-04-15 23:44:13

Why and why are files created because of cron?

I have cron on mysql.php file.

The cron executes curl requests and exits.

Question: Why are files created, mysql.php.1,2,3,4,5,xxxthey weigh 0, but because there are a lot of files opening root takes about 5 minutes.

5e97718de113c116867985.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2020-04-16
@aopil

it looks like you have a script running through wget?
https://superuser.com/questions/166387/wget-o-writ...

F
Foxcloud Foxcloud, 2020-04-17
@FoxCloud

This may occur for several reasons:
- The creation of mysql.php.* files may not be due to cron, but as a result of the execution of another script.
Files are being created more than 1 file per minute, we recommend that you look at the process that creates this file. For example, open TOP on the server and watch the running processes for 1-2 minutes.
- Creation of files can be caused by stdout after execution of the cron script. Redirect stdout to >/dev/null 2>&1:
#crontab -e
* /path_to_script/your_script.php >/dev/null 2>&1
- Creation of files may be due to a script that is called by cron. Make sure that the called script is written correctly. Disable the cron and see. If the files will not be created, then this is definitely the work of this script.
Please note that if you have a large number of files on the server, you may run out of inodes space on the server and it will go out of order. Also, a large number of files on the server slows down its work.
)(*&$^%@#&YUIJKEMS(_*&(^%#^$)) I see Zhenya answered already, sorry -8 minutes ;/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question