fopen returns invalid handle after long server uptime
#1

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:

pawn Код:
new File:open = fopen("(FILE NAME HERE)", io_write); //same thing happens on all filemode
    if(open)
    {
        //File operation here
        fclose(open);
    }
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
Quote:
Originally Posted by SiripIkan
Посмотреть сообщение
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..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)