Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of File size limit exceeded error

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will give you a detailed explanation on how to solve the problem of File size limit exceeded errors. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Encounter a problem, use Yii framework to write php script, export more than 1 million data in db, run successfully.

However, when running to section 490000, the script terminates with the error "File size limit exceeded", which leads to google that a file size exceeds the system limit. The author's first reaction was that the log file was full. Check log hastily, there are only a few dozen K! So where is this "big file"?

At the beginning of the analysis, it can not be the problem of the Yii framework, this is the abnormal problem of the linux operating system and no light in the framework, nor is it the log file size, after a careful look at the files under all the settings of the log path, they are all small enough to be ignored, even if the debug of Yii is turned off, there is the same problem.

Then change the way of thinking, rerun the script, run the script again, and find that the time of dead is very regular. It all hangs up at 450000 records, no more or less, and begins to suspect that it has something to do with the process. Decide to view the io affected by the scripting process.

1. Get the script process's

2. Use the lsof command to view the io of this pid: lsof-p

Found a suspected file data0/xdebug/cachegrind.out., with the execution of the script, the size of the xdebug file also increased, and finally, as you wish, hang up! At this time, the file size is: 2147483647feet!

Haha, what a familiar number, 2 ^ 31-1!

It seems that the problem has been found. When the script is executed, xdebug also writes and logs the script process, and when the file size exceeds the file size that the system can support, it dies as scheduled.

Ok, turn off xdebug, rerun the script, and the record of more than one million is finished smoothly.

Ps: the server used by the author is a 32-bit system, and in the 32-bit operating system, because it is binary, the maximum data storage is 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

Because of this, the decimal system reflected in other visual systems is 2147483647.

This is the end of the article on "how to solve the problem of File size limit exceeded errors". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report