Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2014
    Location
    hamilton, ohio
    Posts
    100
    Plugin Contributions
    0

    Default Help diagnosing extremly slow loading site...

    Hello everyone. I am a new Zenner, and I must say I do like me some zencart. I think I recently screwed my site up with a sql patch though, which doesn't come with an uninstall patch unfortunately. Here is the patch is question:

    http://www.zen-cart.com/downloads.php?do=file&id=613

    (Notice it is for 1.3.8, and my zencart version is 1.5.1 ..., not the brightest thing I ever did...)

    My site is:

    www.oldworldarchery.com

    Now the reason I think this screwed up my site is that after installing this mod, it didn't work for one. And then almost instantly my site started coming to a crawl, where as I used to have a decent parse time at least. Not great due to images, but still decent. Now I am getting anywhere from 10. to 30. parse time, the site is unusable, and pretty much broken half the time. I only have around 200 products, and they all only have one attribute. And unfortunately google merchant is under going a review of my site at this time. I just optimized my images at around 80PX for small images, 300PX for medium images, and 600PX for large images, to no help. I have followed all the tutorials on zencart for speeding up your site, actually before all this happened and it worked pretty good. This is why I suspect this add-on screwed things up, and now I have no idea how to go back in time and reverse it. My hosting is shared, but I never had any problems like this before. Can any help figure out what is going on here? Sometimes it won't even load at all and just times out. The only code the sql patch has was:

    ALTER TABLE `featured` ADD `sort_order` INT( 11 ) NOT NULL DEFAULT '0' AFTER `featured_date_available` ;

    So I went into mysql and tried to just drop sorted from the featured table, which of course broke my site, . So I am stumped. The installation also replaced some file in admin and includes, as well as the featured.php. So I replaced those files with backup files, but I don't know if that was a bad idea or what. I had to though because the add-on made the featured products in my zencart broken.

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Help diagnosing extremly slow loading site...

    Quote Originally Posted by toomanyknots View Post
    (Notice it is for 1.3.8, and my zencart version is 1.5.1 ..., not the brightest thing I ever did...)
    May not be the brightest idea, but it is a good way to learn stuff. :)

    Quote Originally Posted by toomanyknots View Post
    The only code the sql patch has was:
    ALTER TABLE `featured` ADD `sort_order` INT( 11 ) NOT NULL DEFAULT '0' AFTER `featured_date_available` ;
    This addition in itself will have no bearing on your problem. There would be no need to remove it. In fact doing so is likely to cause *additional* problems.

    Quote Originally Posted by toomanyknots View Post
    So I went into mysql and tried to just drop sorted from the featured table, which of course broke my site, .
    Bummer. My warning came a little too late. I still think it worth mentioning though because a lot of people tend to go this route and end up in the same boat.

    Quote Originally Posted by toomanyknots View Post
    So I am stumped. The installation also replaced some file in admin and includes, as well as the featured.php.
    Yes, the add-on would have had to add or replace files in order for it to function, because the default files wouldn't 'know' about this new database addition (which is why the database addition alone will never cause any problems).

    Quote Originally Posted by toomanyknots View Post
    So I replaced those files with backup files, but I don't know if that was a bad idea or what. I had to though because the add-on made the featured products in my zencart broken.
    You did the right thing here (there is no other solution). The reason the site broke when you deleted the DB entry is because one or more of those files were/are making a reference to the DB record that no longer exists.

    The fact that it is still broken means that either a new file that was added by the module hasn't yet been removed, OR there is still one (or more) files that got modified by the install that have yet to be restored. Those are the only real possibilities (unless you somehow managed to delete more than you should have from the database).

    My general rule of thumb (for those that care to take note) is to never ever manually modify the database unless you know *exactly* what you are doing. If a module makes database changes and you later decide to remove the module (and there isn't an uninstall SQL script) then leave the database alone, because unless all the associated code additions are also reverted that could be the only thing keeping the store working..
    Or putting it another way, never delete anything from the database unless you are sure that there are no files remaining that would want to access whatever it was that was deleted. The DB can have endless amount of 'junk' added to it with no ill effects (simply because the additions are ignored by all existing code). The real issues arise when new/additonal code attempts to access a DB record that no longer exists, which is the position that you are now finding yourself in.

    The solution will be very easy... just identify and restore the files that are trying to access this now non-existant DB record. The hard part is in identifying which file(s) they may be, and sadly, you are pretty much on your own here.

    Cheers
    RodG

  3. #3
    Join Date
    Jun 2014
    Location
    hamilton, ohio
    Posts
    100
    Plugin Contributions
    0

    Default Re: Help diagnosing extremly slow loading site...

    The file I dropped was a sorted file from the featured table. I restored a backup featured table from a back up of my sql. I wish I had backed up my sql before installing this patch. I have no idea whats going on. Do you think if I didn't delete any files in added it could be doing something to slow down things? It just happened all of a sudden, I am almost thinking of installing easy populate, save my products, and do a clean install just because if I can't figure this out I am screwed pretty much.

  4. #4
    Join Date
    Jun 2014
    Location
    hamilton, ohio
    Posts
    100
    Plugin Contributions
    0

    Default Re: Help diagnosing extremly slow loading site...

    Just got 32 parse time. I am averaging probably 20 parse. This is nuts? What could be wrong?

  5. #5
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Help diagnosing extremly slow loading site...

    It's probably an issue with an overloaded server.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Help diagnosing extremly slow loading site...

    While the plugin does put some old code onto your site, if you put back all the original .php files you replaced then you will remove all the effects of that plugin.

    And after having done that there's no reason it should have any effect on your site's performance.


    (If you leave artifacts of the plugin in your PHP files then it might be trying to do Execute instead of ExecuteRandom and MoveNext instead of MoveNextRandom when interacting with the database, and if those are mismatched (by mixing and matching the plugin's files instead of the original ZC files) then it "might" affect speed a bit. But removing all the plugin's files and putting back the original ZC files completely fixes that.)

    I'm inclined to say your site's performance problems are NOT related to that plugin.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Help diagnosing extremly slow loading site...

    Quote Originally Posted by toomanyknots View Post
    ... which doesn't come with an uninstall patch unfortunately. Here is the patch is question:

    ALTER TABLE `featured` ADD `sort_order` INT( 11 ) NOT NULL DEFAULT '0' AFTER `featured_date_available` ;
    The uninstall for that would be:
    Code:
    ALTER TABLE `featured` DROP COLUMN `sort_order`;
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Help diagnosing extremly slow loading site...

    Quote Originally Posted by toomanyknots View Post
    The file I dropped was a sorted file from the featured table.
    I assume that by this, you really mean that you dropped the column/field in the 'featured' table? (Databases don't tend to contain 'files')

    Sorry if I appear to be a little pedantic, but it saves confusion if files (the things stored on disk) don't get confused with 'tables' or 'fields' that are stored in a database.

    Quote Originally Posted by toomanyknots View Post
    I restored a backup featured table from a back up of my sql.
    Was this before or after you 'dropped' the 'sorted file'?

    Not that it really matters at this stage, because as I tried as hard as I could to impress upon you that this isn't a database problem I somehow think that you didn't quite get the message.

    Quote Originally Posted by toomanyknots View Post
    I wish I had backed up my sql before installing this patch.
    It wouldn't have helped you in any way whatsoever. IT IS NOT A DATABASE ISSUE (Well, at least it *wasn't* a database issue until you started to mess with it). It *probably* still isn't a DB issue, but I can no longer be as confident about this as I was originally.

    Quote Originally Posted by toomanyknots View Post
    I have no idea whats going on.
    I know *exactly* what is going on. If we forget about the database for the time being, the problem is a result of one or more of the *files* that were changed/added by this module haven't been completely restored or removed when you attempted to uninstall it.

    You *may* have *compounded* the issue by messing with the database, which now means you have TWO separate issues to solve.
    1) Removing/replacing the file(s) that are trying to use the now non-existant Database field, and
    2) Fixing any problems caused by the *needless* changes you made to the database whilst trying to uninstall the module.

    Although #2 is a possibility, I still consider it to be a rather small one, especially since you've already restored it from a backup.

    Quote Originally Posted by toomanyknots View Post
    Do you think if I didn't delete any files in added it could be doing something to slow down things?
    I can't comment on this particular module, but I can say that a poorly written module can cause some very serious slowdowns.

    Quote Originally Posted by toomanyknots View Post
    It just happened all of a sudden, I am almost thinking of installing easy populate, save my products, and do a clean install just because if I can't figure this out I am screwed pretty much.
    You don't need easypopulate for this. You can export/import the entire database with phpmyadmin.. Not that it will be of any help because my money is still on the files, and your issues have nothing to do with the database itself.

    Even a 'clean install' may not solve the problem if the 'clean install' is performed in the same folder(s) as the current installation unless you delete all the files that already reside there first. This is a rather drastic step to take though.

    A far better option would be to open the zip file for the add-on module in question, then using this as a guide delete the same named files from your server, and finally replace them with a copy from the ZenCart distribution package (or your own current backups made before installing the module). DON'T TOUCH THE DATABASE.

    You *may* even be able to identify the errant file by using ZenCarts 'Developers Toolkit' and performing a search for `sort_order` but you'll find that there are a lot of results to be found for this query, but if you find it in a file that matches one of those installed/modified by the module then that is most likely to be the culprit. There may also be more than one file involved.

    Cheers
    RodG

  9. #9
    Join Date
    Jun 2014
    Location
    hamilton, ohio
    Posts
    100
    Plugin Contributions
    0

    Default Re: Help diagnosing extremly slow loading site...

    Quote Originally Posted by DrByte View Post
    While the plugin does put some old code onto your site, if you put back all the original .php files you replaced then you will remove all the effects of that plugin.

    And after having done that there's no reason it should have any effect on your site's performance.


    (If you leave artifacts of the plugin in your PHP files then it might be trying to do Execute instead of ExecuteRandom and MoveNext instead of MoveNextRandom when interacting with the database, and if those are mismatched (by mixing and matching the plugin's files instead of the original ZC files) then it "might" affect speed a bit. But removing all the plugin's files and putting back the original ZC files completely fixes that.)

    I'm inclined to say your site's performance problems are NOT related to that plugin.
    I just went back and re-replaced all the php files with backups, just to make sure. Thank you for the clarification, I'm sure it is obvious I don't know jack about what I am doing, . Thank you for the code, I will try that out too. When I replaced the php files I overwrite-ed them, so I would think it wouldn't leave in artifacts.

  10. #10
    Join Date
    Jun 2014
    Location
    hamilton, ohio
    Posts
    100
    Plugin Contributions
    0

    Default Re: Help diagnosing extremly slow loading site...

    "I assume that by this, you really mean that you dropped the column/field in the 'featured' table? (Databases don't tend to contain 'files')

    Sorry if I appear to be a little pedantic, but it saves confusion if files (the things stored on disk) don't get confused with 'tables' or 'fields' that are stored in a database. "


    Thats totally fine, I need to learn these things, so please feel free to correct me!

    "Was this before or after you 'dropped' the 'sorted file'?

    Not that it really matters at this stage, because as I tried as hard as I could to impress upon you that this isn't a database problem I somehow think that you didn't quite get the message."


    It was after, and I restored only the featured table, which was a back up from just a day or two ago. And I don't mean to make any impressions that I think it is one thing or another, I have absolutely no clue, which is why I came here asking for help, . I thought it might of been that plugin because it slowed down afterwards, but like I said I am a novice and am quite inexperienced with zencart or web design in general, so I truly appreciate any help offered!

    "A far better option would be to open the zip file for the add-on module in question, then using this as a guide delete the same named files from your server, and finally replace them with a copy from the ZenCart distribution package (or your own current backups made before installing the module). DON'T TOUCH THE DATABASE."


    I have done this twice now just to be sure. So I am stumped now. So I can export my products and re-import them again into a clean install? I was going to re-build my entire site from scratch, as if I can't get this issue fixed, I don't know what else to do.
    Last edited by toomanyknots; 30 Jul 2014 at 07:30 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Slow Loading times on site and in Admin
    By Goetch in forum General Questions
    Replies: 8
    Last Post: 2 Apr 2013, 12:06 PM
  2. Dev Site loading extremely slow
    By windsurfer in forum Installing on a Windows Server
    Replies: 8
    Last Post: 15 Feb 2012, 09:45 PM
  3. Site Loading Slow
    By rcj79 in forum General Questions
    Replies: 2
    Last Post: 14 Oct 2010, 04:02 AM
  4. Slow site loading - try my site pls.
    By deathsdoor in forum General Questions
    Replies: 54
    Last Post: 7 Jun 2009, 07:09 PM
  5. Site loading really slow -- on ipower
    By jrod31 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 2 Apr 2008, 11:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg