29.01.2015, 09:00
(
Последний раз редактировалось SiripIkan; 04.02.2015 в 20:15.
)
So, my server (Linux VPS) has a problem with fopen. After long time since server started (about 6 hours uptime or more), fopen starts to return invalid handle on every file even they all exist. This method:
Just keeps the server running with fopen not functioning until server restarts.
This problem made players data keep reset until I changed the saving system to SQLite. Even i've changed it, this problem still exists. And now the INSERT and UPDATE Query doesn't work after long time along with invalid fopen handle. it really frustating me D:
Can someone help me? thanks before.
Okay sorry for my bad English.
Solved
pawn Код:
new File:open = fopen("(FILE NAME HERE)", io_write); //same thing happens on all filemode
if(open)
{
//File operation here
fclose(open);
}
This problem made players data keep reset until I changed the saving system to SQLite. Even i've changed it, this problem still exists. And now the INSERT and UPDATE Query doesn't work after long time along with invalid fopen handle. it really frustating me D:
Can someone help me? thanks before.
Okay sorry for my bad English.
Solved
Quote:
Have checked it with FileEx Include and noticed a file handle doesn't get closed after being opened. This file always called when OnPlayerConnect() triggers.
After closing this file handle now the problem is gone. Thanks all for helping, especially for Vince.. |