Subscribe: RSS
  • Hi,

    In the morning, I was able to log into the MODx manager. I made a change to a snippet, saved it, and the site looks fine.

    Later in the afternoon, I attempted to log in (with the same login info that I used earlier in the day), but now I get a solid error dialog entitled "The page at http://www.pacificbiosciences.com says:"


    Figure 1. Error while inserting event log into database.

    The dialog apparently is telling me that it failed to add an event to the event log, but I don’t know why that would be. The database login username mentioned in the dialog is correct, and I’m able to view the site, which suggests that the login password is also correct, right? What are the possible root causes of this error? Can you suggest any specific things I can look at?

    Thanks a lot for any help you can offer.

    ken


    • If you have access to phpMyAdmin, find you modx_event_log table (modx_ or whatever table prefix you installed with), see how large it is, and if it is very large, try and look at the last few records to see if there is an error being recorded frequently. Once you get that information, truncate (or empty) that table. Let us know what you find.
      • There are only 9 records in the modx_event_log table. They are all errors.

        The latest record, record 9, has ’1205366662’ in the createdon field, and the description field contains:

        <b>Undefined index:  nrtotalmessages</b><br /><br /> <html>
        <head>
        	<title>MODx</title>
        	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        	<link rel="stylesheet" type="text/css" href="media/style/MODx/style.css?" />
        	<link rel="stylesheet" type="text/css" href="media/style/MODx/coolButtons2.css?>" />
        	<script type="text/javascript">var MODX_MEDIA_PATH = "media";</script>
        	<script type="text/javascript" language="JavaScript" src="media/script/modx.js"></script>
        	<script type="text/javascript" language="JavaScript">
        		document.setIncludePath("media/script/bin/");
        		document.addEventListener("oninit",function() { 
        			document.include("dynelement");
        		})
        	</script>	
        	<script type="text/javascript" language="JavaScript" src="media/script/cb2.js"></script>
        	<script language="JavaScript" type="text/javascript">
        
        		var MODX_MEDIA_PATH = "media"; // set media path
        
        		function document_onload() {
         			stopWorker();
         			msgCount(); 
         			hideLoader();
         			;  
        		};
        		
        		var dontShowWorker = false;
        		function document_onunload() {
         			if(!dontShowWorker) {
         				top.scripter.work();
         			}
         		};
        		
        		// set tree to default action.		
        		parent.menu.ca = "open";
        
        		function msgCount() {
        			try {
        				top.scripter.startmsgcount(,,0);
        			} catch(oException) {
        				ww = window.setTimeout('msgCount()',1000);
        			}
        		}
        		
        		function stopWorker() {
        			try {
        				parent.scripter.stopWork();
        			} catch(oException) {
        				ww = window.setTimeout('stopWorker()',500);
        			}
        		}
        		
        		function doRefresh(r) {
        			try {
        				rr = r;
        				top.scripter.startrefresh(rr);
        			} catch(oException) {
        				vv = window.setTimeout('doRefresh()',1000);
        			}
        		}
        		var documentDirty=false;
        
        		function checkDirt() {
        			if(documentDirty==true) {
        				event.returnValue = "The changes you have made have not been saved yet. You can choose to stay on the current page in order to save the changes ('Cancel'), or you can leave this page, losing any changes you have made ('OK').";
        			}
        		}
        		
        		function saveWait(fName) {
        			document.getElementById("savingMessage").innerHTML = "Saving, please wait...";
        			for(i = 0; i < document.forms[fName].elements.length; i++) {
        				document.forms[fName].elements[i].disabled='disabled';
        			}
        		}
        
        		var managerPath = "";
        
        		function hideLoader() {
        			document.getElementById('preLoader').style.display = "none";
        		}
        		
        		retry=0;
        		function loadagain(id) {
        			try {
        				top.menu.Sync();
        			} catch(oException) {
        				retry=retry + 1;
        				if(retry<4) {
        					xyy=window.setTimeout("loadagain()", 2000);
        				} else {
        					//alert("Failed to sync to tree!");
        				}
        			}
        		}
        
        		hideL = window.setTimeout("hideLoader()", 5000);
        		
        	</script>
        	<style>
        	#preLoader {
        		position: 						absolute;
        		z-index:						50000;
        		width:							100%;
        		height:							100%;
        		text-align:						center;
        		vertical-align:					middle;
        	}
        	.preLoaderText {
        		background-color:				#ffffff;
        		width:							300px;
        		height:							150px;
        		padding:						50px;
        		border:							1px solid #999999;
        	}
        	</style>
        </head>
        <body ondragstart="return false" onbeforeunload="checkDirt();">
        
        <div id="preLoader"><table width="100%" height="50%" border="0" cellpadding="0"><tr><td align="center"><div class="preLoaderText">Please wait while MODx loads the page...</div></td></tr></table></div>


        I don’t know if this is helpful.

        Thanks,

        ken
        • Hey, could this be a database space allocation issue?

          I just noticed that I had allocated 50MB to the modx_cms database. This isn’t a huge site, but there are something in the neighborhood of 80-90 pages, most of them are relatively content rich.

          Is there an easier way to get an estimate of the size of the database; other exporting it out as CSV and looking at the filesize of the exported file? Does phpMyAdmin have some kind of database size utility?

          Thanks a bunch!

          ken
          • Inside the Manager => Reports => System Info scroll down and you’ll see a summary of the DB tables
            • Well, turns out that the database was occupying over 100MB (thanks for the phpMyAdmin tip, Bunk58).

              I’ve bumped it up to 300MB and everything works fine again.

              Thanks for your help, all!

              ken