asunyer90 Posted March 15, 2013 Report Share Posted March 15, 2013 Hi! I have in my hosting the last stable phpvms 2.1.934 and when I try to update the pilot's profile it shows me Fatal error: Out of memory (allocated 149684224) (tried to allocate 11780 bytes) in/home/cargoita/public_html/xxx/core/classes/ezdb/ezdb_mysql.class.php on line 277 The most strange thing is that in another folder of my hosting, I have installed the last phpvms-dev and it doesn't give me this error on that page. Is so wierd because I tried to update some files ( Like in the PIREP list from Admin center, I had the same problem of memory, but when I updated pireps_list and some others the problem was solved.) and it works. Can someone explain me what or which files should I change / update to get the Pilot profile (admin) working and don't get this error. I readed some topics here and it says that the problem is from the server, but definitely don't think so, because in the other folder (phpvms-dev) is working perfectly. Thanks, Albert. Quote Link to comment Share on other sites More sharing options...
flyalaska Posted March 16, 2013 Report Share Posted March 16, 2013 Ask your server what the max allocated memory is. I had this issue. Got fixed when my host moved it up to 128mb. Quote Link to comment Share on other sites More sharing options...
asunyer90 Posted March 16, 2013 Author Report Share Posted March 16, 2013 Yes but, why in one folder (dev version) works and on another folder (stable version) it doesn't ? Quote Link to comment Share on other sites More sharing options...
Cor Posted April 3, 2013 Report Share Posted April 3, 2013 I have the same problems. Use 756 MB for memory, but still having problems. My pirep database is now more then 450 MB. Accepting the pireps takes for ages. Who has some tips. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted April 3, 2013 Administrators Report Share Posted April 3, 2013 If you are using the TopPilot module I wrote a couple of years ago it is part of the reason for the increased memory usage. When I wrote it I did not figure on VA's having 10k + PIREPs in their database. Try removing that module and see if the memory usage declines some. There are also some other calculations that go on when a PIREP is accepted within the core of phpVMS. I have moved most of those to the daily maintenance function that is run using a cronjob for my own va. I have been thinking that there needs to be a way to archive PIREPs that are older than X months or years and remove them from the main table. Quote Link to comment Share on other sites More sharing options...
Cor Posted April 4, 2013 Report Share Posted April 4, 2013 The part of the toppilot module that caused the wait is in a cronjob. Is there a list of which calculations are being done while accepting a pirep because there is a big problem. I was also thinking about a way to archive old pireps and already made a phpvms_pireps_2011 and phpvms_pireps_2012. Now I have to see which scripts need to be change so al will be working, but I am not a programmer so it can take a while Cor Quote Link to comment Share on other sites More sharing options...
Cor Posted April 7, 2013 Report Share Posted April 7, 2013 I have been looking and concerning the pireps there is a lot of coding. Are there more people except simpilot who has problems with the fact that the pirepsdatabase is getting to big. Resethours will not work anymore at this time. Cor Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 7, 2013 Report Share Posted April 7, 2013 I had the same issue. I have set up a cron job that removes the logs, route_details and such stuff for pireps older than 3 months. Now with that it's working again but i guess as the table gets bigger the problem will be back sometimes. Quote Link to comment Share on other sites More sharing options...
Cor Posted April 7, 2013 Report Share Posted April 7, 2013 Would you be so kind to share that with us, it will buy me some time and trying to look for another solution. I would apprecaire it Regards, Cor Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 7, 2013 Report Share Posted April 7, 2013 Sure... i'll have a look for it when i get home tonight. Quote Link to comment Share on other sites More sharing options...
Cor Posted April 7, 2013 Report Share Posted April 7, 2013 Thank you Cor Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 7, 2013 Report Share Posted April 7, 2013 mysql_query("update phpvms_pireps set rawdata='', log='', route='' where submitdate < DATE_SUB(NOW(), INTERVAL 3 MONTH)") or die(mysql_error()); ; i have added that to a cron job that runs once a month updating some other things as well on my databae. You can basically add it to any cron job you want to or create a new extra cronjob for it. You might need to change phpvms_pireps to your correct table prefix. Quote Link to comment Share on other sites More sharing options...
Cor Posted April 8, 2013 Report Share Posted April 8, 2013 Tnx, I will give it a go as soon as I am off work. i will let you know and trying to look for a permanent solution. Maybe as simpilot suggested, pireps older then a certain date being removed from the main database. Maybe Nabeel has an solution :-) Regards, Cor Quote Link to comment Share on other sites More sharing options...
Cor Posted April 8, 2013 Report Share Posted April 8, 2013 It worked and the pireps database reduced with almost 140MB. Tnx we are good for now Cor Quote Link to comment Share on other sites More sharing options...
bwilber Posted April 9, 2013 Report Share Posted April 9, 2013 Would this solution not skew the total va flight hours number? I display that on the front page of both VA's that I deal with using phpVMS. I could remove it, or just let it be knowing that the VA has actually flown more, but there has to be a better solution to this. Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 9, 2013 Report Share Posted April 9, 2013 that doesnt delete the pireps.... it just empties the route, log, and rawdata columns as they are using most space. I guess after 3 months nobody looks at these things anymore. Quote Link to comment Share on other sites More sharing options...
mseiwald Posted April 9, 2013 Report Share Posted April 9, 2013 It worked and the pireps database reduced with almost 140MB. Tnx we are good for now Cor glad that it worked for you Quote Link to comment Share on other sites More sharing options...
Cor Posted April 9, 2013 Report Share Posted April 9, 2013 Would this solution not skew the total va flight hours number? I display that on the front page of both VA's that I deal with using phpVMS. I could remove it, or just let it be knowing that the VA has actually flown more, but there has to be a better solution to this. Thats what we have to look for. For me this was a temporary solution as the pirepsdata base will still grows. Not so fast as it did but it will grow. Regards, Cor Quote Link to comment Share on other sites More sharing options...
bwilber Posted April 11, 2013 Report Share Posted April 11, 2013 Is anybody working on a solution for this? I know a little php (just about enough to be dangerous) but I don't know how php or mysql uses memory. Is this a php memory issue, or is it mysql causing problems? I have tried setting the php.ini to as high as 1024M with no luck in solving it. The strange thing is, flyalaska told me he has his set to 128M and has over 12000 pireps and doesn't get the error. Strange indeed. Quote Link to comment Share on other sites More sharing options...
bwilber Posted April 27, 2013 Report Share Posted April 27, 2013 I guess this is a dead issue then. If someone could point me in a general direction where to look, I'd be happy to look and see what I might find and report it back here. Quote Link to comment Share on other sites More sharing options...
bwilber Posted May 24, 2013 Report Share Posted May 24, 2013 I really could use some help on this issue. I am having to remove PIREPS from the db at an alarming rate and pilots are becoming a bit disgruntled over it. Please, somebody just give me some idea what to look at if you don't have time to look at it yourself. Not even responding, however, is really unprofessional and offputting. Please don't just leave your users hanging like this. I understand fully that this is offered free of charge, I get that. But if you intend to offer something, free or otherwise, don't you want satisfied "customers?" Sorry to rant, but this is a problem that has been around for quite some time, with zero response from anyone who might be able to help us. Quote Link to comment Share on other sites More sharing options...
Cor Posted May 24, 2013 Report Share Posted May 24, 2013 Not even responding, however, is really unprofessional and offputting. Please don't just leave your users hanging like this. I understand fully that this is offered free of charge, I hate this kind of response. There was a solution given by mseiwald and I used that solotion and it works perfectly. It reduced my pirepdatabase to 100 MB (was 450MB). I think that most people don`t have the problem anymore because of the solution, Don´t say that the people here are unprofessional, that is not nice and will come back to you when you have other problems you need help with. Regards, Cor Quote Link to comment Share on other sites More sharing options...
bwilber Posted May 24, 2013 Report Share Posted May 24, 2013 I didn't say the people were unprofessional. I said that not answering was unprofessional and it is. To me, mseiwald's solution is not really a solution, it is a temporary fix. I will use it, but I would like to at least know that someone is looking into the root problem. I even volunteered my help if someone would at least point me in a direction to look. There just has to be a way to make this program work correctly without a band aid. Again, I don't mean to call anyone unprofessional, but I would like a response at least. Heck, just tell me it's not worth looking into if that's how you feel, but don't leave me hanging. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 25, 2013 Administrators Report Share Posted May 25, 2013 If you have set your memory limit as high as "1024M" and still get the error I would say that there are more issues than the phpVMS script. Either the override is not being used by the system, some hosts do not allow local php.ini overrides outside of the server root, the command may be in the wrong place, it is too late in the script to make a difference, or the server has a very low memory capacity. If you are positive that the server is actually giving you that much memory you can start working your way through the functions that are parsed when you update a Pilots Profile on the admin side in the PilotAdmin.php file. I would start with line #158 -> https://github.com/phpVMS/phpVMS/blob/master/admin/modules/PilotAdmin/PilotAdmin.php#L158 - The updatetotalhours is notorious for causing issues for both pilot and airline statistics. Feel free to work on it and create a pull request on GitHub and it will be reviewed and merged in if it is benficial. As far as the group being unprofessional, I do not know what to tell you, we are all volunteers that try to help when we can. I thought twice myself before posting this response figuring I am just going to get a backlash anyway, but I have tried to give you a direction to go per your request. Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted May 25, 2013 Moderators Report Share Posted May 25, 2013 I said that not answering was unprofessional and it is. Sorry for saying that to you but we are not obliged to help you and offer support in anything. Quote Link to comment Share on other sites More sharing options...
bwilber Posted May 26, 2013 Report Share Posted May 26, 2013 Thank you for responding, David. I'm not sure why you would expect backlash. All I wanted was someone to at least respond, and let us know that you are at least aware of some of us experiencing this problem, and try to point me in some direction to look. You have done that and I am grateful. Again, I want to say that I am NOT calling anyone or any group unprofessional. That is uncalled for and I am sorry that some at least took it that way. I merely meant that the act, if you will, of not responding for a month and a half, to a post in a SUPPORT forum, is unprofessional. The act, not the person. But obviously, I have offended some, and for that I apologize. As for the issue, the website in question is on a friend's server to which I have access. I did not use overrides, I have set the memory allocation in the php.ini file directly. The server is showing 2GB of memory and 1GB of virtual. That should be sufficient I would think. The thing that puzzles me is that flyalaska has more pireps in his db and sets his memory to a lower setting and has no problems. I consider myself a novice at php but I am learning, and I will take a look now that I know where to look. I also have a friend who is a professional developer and I will try to get some advice from him. Thanks again' Brian Quote Link to comment Share on other sites More sharing options...
bwilber Posted May 26, 2013 Report Share Posted May 26, 2013 Sorry for saying that to you but we are not obliged to help you and offer support in anything. You are right, sir. You are not obligated to do so, but why then would you offer a support forum. So people can ask questions to which they will never receive an answer? I am sorry I offended you, I just wanted some help. Quote Link to comment Share on other sites More sharing options...
gio1961 Posted September 23, 2014 Report Share Posted September 23, 2014 Good evening to all, where to insert this string? thanks for any answer ... mysql_query ("update phpvms_pireps September rawdata = '', log = ',' route = '' where submitdate <DATE_SUB (NOW (), INTERVAL 3 MONTH)") or die (mysql_error ()); Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted September 24, 2014 Administrators Report Share Posted September 24, 2014 Good evening to all, where to insert this string? thanks for any answer ... mysql_query ("update phpvms_pireps September rawdata = '', log = ',' route = '' where submitdate <DATE_SUB (NOW (), INTERVAL 3 MONTH)") or die (mysql_error ()); You can use the update phpvms_pireps rawdata = '', log = ',' route = '' where submitdate <DATE_SUB (NOW (), INTERVAL 3 MONTH) part right in your phpMyAdmin interface for your database, or include it all in a php script within your system. Quote Link to comment Share on other sites More sharing options...
gio1961 Posted October 18, 2014 Report Share Posted October 18, 2014 It does not work ... I put the string in the file ezdb_mysql.class.php Thanks for any response // Store Query Results while($row = mysql_fetch_object($this->result)) { // Store relults as an objects within main array $this->last_result[$num_rows] = $row; $num_rows++; } mysql_query("update phpvms_pireps set rawdata='', log='', route='' where submitdate < DATE_SUB(NOW(), INTERVAL 3 MONTH)") or die(mysql_error()); mysql_free_result($this->result); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.