-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileCache: Fix parsing issue on already removed or empty file #87
base: master
Are you sure you want to change the base?
Conversation
Already ha seen such issue - I think it was a serialize issue. |
I firstly thought it was an issue in the file itself : content is empty or file deleted. Yet, even with my patch I had the same error today somehow so it should be an issue in the I'm trying to catch the error and check the read content to so what's going on. For now, I'm waiting that the issue occur again. I will update this issue when ready. |
I finally had the error back today (had to wait) and I suspect somehow an issue with CCP : when the market endpoint was restored (a few days ago) I had several issues of this kind (the main reason I opened this PR). Here is the content of the file when parsed following this PHP code : // Get the data from the file and unserialize it
$data = @unserialize($content);
if (is_bool($data)) {
throw new \ErrorException('unserialize is a bool : ' . ($data ? 'true': 'false') . '. File content = "' . print_r($content, true) . '"');
} The exception, when wrote down on my custom logger says : [14/05/2023 19:49:46] Exception: ErrorException
[14/05/2023 19:49:46] Message: unserialize is a bool : false. File content = "O:33:"Seat\Eseye\Containers\EsiResponse":4:{i:0;i:2;i:1;a:65:{i:0;O:8:"stdClass":6:{s:7:"average";d:10000000;s:4:"date";s:10:"2022-04-04";s:7:"highest";d:10000000;s:6:"lowest";d:10000000;s:11:"order_count";i:2;s:6:"volume";i:4;}i:1;O:8:"stdClass":6:{s:7:"average";d:11200000;s:4:"date";s:10:"2022-04-10";s:7:"highest";d:16000000;s:6:"lowest";d:10000000;s:11:"order_count";i:2;s:6:"volume";i:5;}i:2;O:8:"stdClass":6:{s:7:"average";d:16000000;s:4:"date";s:10:"2022-04-11";s:7:"highest";d:16000000;s:6:"lowest";d:16000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:3;O:8:"stdClass":6:{s:7:"average";d:10000000;s:4:"date";s:10:"2022-04-12";s:7:"highest";d:10000000;s:6:"lowest";d:10000000;s:11:"order_count";i:1;s:6:"volume";i:5;}i:4;O:8:"stdClass":6:{s:7:"average";d:10000000;s:4:"date";s:10:"2022-04-13";s:7:"highest";d:10000000;s:6:"lowest";d:10000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:5;O:8:"stdClass":6:{s:7:"average";d:16000000;s:4:"date";s:10:"2022-04-15";s:7:"highest";d:16000000;s:6:"lowest";d:16000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:6;O:8:"stdClass":6:{s:7:"average";d:16000000;s:4:"date";s:10:"2022-04-18";s:7:"highest";d:16000000;s:6:"lowest";d:16000000;s:11:"order_count";i:2;s:6:"volume";i:2;}i:7;O:8:"stdClass":6:{s:7:"average";d:16000000;s:4:"date";s:10:"2022-04-20";s:7:"highest";d:16000000;s:6:"lowest";d:16000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:8;O:8:"stdClass":6:{s:7:"average";d:10000000;s:4:"date";s:10:"2022-04-21";s:7:"highest";d:10000000;s:6:"lowest";d:10000000;s:11:"order_count";i:2;s:6:"volume";i:3;}i:9;O:8:"stdClass":6:{s:7:"average";d:9999000;s:4:"date";s:10:"2022-04-22";s:7:"highest";d:9999000;s:6:"lowest";d:9999000;s:11:"order_count";i:1;s:6:"volume";i:3;}i:10;O:8:"stdClass":6:{s:7:"average";d:16000000;s:4:"date";s:10:"2022-04-28";s:7:"highest";d:16000000;s:6:"lowest";d:16000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:11;O:8:"stdClass":6:{s:7:"average";d:10000000;s:4:"date";s:10:"2022-04-29";s:7:"highest";d:10000000;s:6:"lowest";d:10000000;s:11:"order_count";i:2;s:6:"volume";i:3;}i:12;O:8:"stdClass":6:{s:7:"average";d:9999000;s:4:"date";s:10:"2022-05-03";s:7:"highest";d:9999000;s:6:"lowest";d:9999000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:13;O:8:"stdClass":6:{s:7:"average";d:9999000;s:4:"date";s:10:"2022-05-08";s:7:"highest";d:9999000;s:6:"lowest";d:9999000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:14;O:8:"stdClass":6:{s:7:"average";d:9999000;s:4:"date";s:10:"2022-05-11";s:7:"highest";d:9999000;s:6:"lowest";d:9999000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:15;O:8:"stdClass":6:{s:7:"average";d:11500000;s:4:"date";s:10:"2022-05-27";s:7:"highest";d:11500000;s:6:"lowest";d:11500000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:16;O:8:"stdClass":6:{s:7:"average";d:10000000;s:4:"date";s:10:"2022-05-31";s:7:"highest";d:10000000;s:6:"lowest";d:10000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:17;O:8:"stdClass":6:{s:7:"average";d:9999000;s:4:"date";s:10:"2022-06-20";s:7:"highest";d:9999000;s:6:"lowest";d:9999000;s:11:"order_count";i:2;s:6:"volume";i:2;}i:18;O:8:"stdClass":6:{s:7:"average";d:9999000;s:4:"date";s:10:"2022-06-26";s:7:"highest";d:9999000;s:6:"lowest";d:9999000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:19;O:8:"stdClass":6:{s:7:"average";d:9994500;s:4:"date";s:10:"2022-07-17";s:7:"highest";d:10000000;s:6:"lowest";d:9989000;s:11:"order_count";i:2;s:6:"volume";i:2;}i:20;O:8:"stdClass":6:{s:7:"average";d:9990000;s:4:"date";s:10:"2022-07-23";s:7:"highest";d:9990000;s:6:"lowest";d:9990000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:21;O:8:"stdClass":6:{s:7:"average";d:11300000;s:4:"date";s:10:"2022-07-27";s:7:"highest";d:11300000;s:6:"lowest";d:11300000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:22;O:8:"stdClass":6:{s:7:"average";d:11490000;s:4:"date";s:10:"2022-08-01";s:7:"highest";d:11490000;s:6:"lowest";d:11490000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:23;O:8:"stdClass":6:{s:7:"average";d:11490000;s:4:"date";s:10:"2022-08-14";s:7:"highest";d:11490000;s:6:"lowest";d:11490000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:24;O:8:"stdClass":6:{s:7:"average";d:1200000;s:4:"date";s:10:"2022-09-26";s:7:"highest";d:1200000;s:6:"lowest";d:1200000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:25;O:8:"stdClass":6:{s:7:"average";d:1200000;s:4:"date";s:10:"2022-09-30";s:7:"highest";d:1200000;s:6:"lowest";d:1200000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:26;O:8:"stdClass":6:{s:7:"average";d:1200000;s:4:"date";s:10:"2022-10-01";s:7:"highest";d:1200000;s:6:"lowest";d:1200000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:27;O:8:"stdClass":6:{s:7:"average";d:5701000;s:4:"date";s:10:"2022-10-25";s:7:"highest";d:5701000;s:6:"lowest";d:5701000;s:11:"order_count";i:3;s:6:"volume";i:3;}i:28;O:8:"stdClass":6:{s:7:"average";d:5701000;s:4:"date";s:10:"2022-11-07";s:7:"highest";d:5701000;s:6:"lowest";d:5701000;s:11:"order_count";i:1;s:6:"volume";i:4;}i:29;O:8:"stdClass":6:{s:7:"average";d:5701000;s:4:"date";s:10:"2022-11-08";s:7:"highest";d:5701000;s:6:"lowest";d:5701000;s:11:"order_count";i:1;s:6:"volume";i:32;}i:30;O:8:"stdClass":6:{s:7:"average";d:11666666.67;s:4:"date";s:10:"2022-11-25";s:7:"highest";d:12500000;s:6:"lowest";d:10000000;s:11:"order_count";i:3;s:6:"volume";i:3;}i:31;O:8:"stdClass":6:{s:7:"average";d:14000000;s:4:"date";s:10:"2022-11-26";s:7:"highest";d:14000000;s:6:"lowest";d:14000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:32;O:8:"stdClass":6:{s:7:"average";d:14000000;s:4:"date";s:10:"2022-11-27";s:7:"highest";d:14000000;s:6:"lowest";d:14000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:33;O:8:"stdClass":6:{s:7:"average";d:11500000;s:4:"date";s:10:"2022-11-29";s:7:"highest";d:14000000;s:6:"lowest";d:10000000;s:11:"order_count";i:3;s:6:"volume";i:14;}i:34;O:8:"stdClass":6:{s:7:"average";d:16000000;s:4:"date";s:10:"2022-12-01";s:7:"highest";d:16000000;s:6:"lowest";d:16000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:35;O:8:"stdClass":6:{s:7:"average";d:15000000;s:4:"date";s:10:"2022-12-04";s:7:"highest";d:15000000;s:6:"lowest";d:15000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:36;O:8:"stdClass":6:{s:7:"average";d:15000000;s:4:"date";s:10:"2022-12-17";s:7:"highest";d:15000000;s:6:"lowest";d:15000000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:37;O:8:"stdClass":6:{s:7:"average";d:15000000;s:4:"date";s:10:"2022-12-20";s:7:"highest";d:15000000;s:6:"lowest";d:15000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:38;O:8:"stdClass":6:{s:7:"average";d:15000000;s:4:"date";s:10:"2022-12-23";s:7:"highest";d:15000000;s:6:"lowest";d:15000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:39;O:8:"stdClass":6:{s:7:"average";d:15000000;s:4:"date";s:10:"2022-12-24";s:7:"highest";d:15000000;s:6:"lowest";d:15000000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:40;O:8:"stdClass":6:{s:7:"average";d:13500000;s:4:"date";s:10:"2022-12-29";s:7:"highest";d:13500000;s:6:"lowest";d:13500000;s:11:"order_count";i:1;s:6:"volume";i:3;}i:41;O:8:"stdClass":6:{s:7:"average";d:13500000;s:4:"date";s:10:"2023-01-02";s:7:"highest";d:13500000;s:6:"lowest";d:13500000;s:11:"order_count";i:1;s:6:"volume";i:14;}i:42;O:8:"stdClass":6:{s:7:"average";d:14000000;s:4:"date";s:10:"2023-01-03";s:7:"highest";d:14000000;s:6:"lowest";d:14000000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:43;O:8:"stdClass":6:{s:7:"average";d:14000000;s:4:"date";s:10:"2023-01-04";s:7:"highest";d:14000000;s:6:"lowest";d:14000000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:44;O:8:"stdClass":6:{s:7:"average";d:11200000;s:4:"date";s:10:"2023-01-09";s:7:"highest";d:11200000;s:6:"lowest";d:11200000;s:11:"order_count";i:1;s:6:"volume";i:20;}i:45;O:8:"stdClass":6:{s:7:"average";d:11200000;s:4:"date";s:10:"2023-01-10";s:7:"highest";d:11200000;s:6:"lowest";d:11200000;s:11:"order_count";i:1;s:6:"volume";i:1;}i:46;O:8:"stdClass":6:{s:7:"average";d:11200000;s:4:"date";s:10:"2023-01-12";s:7:"highest";d:11200000;s:6:"lowest";d:11200000;s:11:"order_count";i:1;s:6:"volume";i:2;}i:47;O:8:"stdClass":6:{s:7:"average";d:11200000;s:4:"date";s:10:"2023-01-15";s:7:"highest";d:11200000;s:6:"lowest";d:11200000;s:11:"order_count";i:1;s:6:"volume";i:5;}i:48;O:8:"stdClass":6:{s:7:"average";d:11200000;s:4:"date";s:10:"2023-01-18";s:7:"highest";d:11200000;s:6:"lowest";d:11200000;s:11:"order_count";i:2;s:6:"volu"
[14/05/2023 19:49:46] Stack trace: #0 /data/www/evemyadmin/web/vendor/eveseat/eseye/src/Eseye.php(245): Seat\Eseye\Cache\FileCache->get()
#1 /data/www/evemyadmin/web/class/EVEOnline/ESI/EsiFactory.php(189): Seat\Eseye\Eseye->invoke() The file content looks truncated leading to an error while unserializing. Because the I've updated my PR accordingly. |
I'm having this kind of error several times per day (18 times today) due to possible multiple call to the endpoint (multi threading).
Waiting for 24 hours before sending this PR for review (trying this on my instance first)