Solved 100% lwc cache and Flushing protection updates issue

Discussion in 'Bukkit Help' started by xKarolusx, Nov 28, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    xKarolusx

    Hello

    I had over 130,000 protections so i decided to use /lwc admin cleanup command, ~100,000 protections was removed.

    LOG: Cleanup completed. Removed 109282 protections out of 130500 checked protections.

    So i was thinking that my problem wont appear again but i was wrong.

    When i have like 50 ppl online on server and then i want to stop server via stop command then i have to wait long time until lwc disable.

    LOGS:
    2012-11-28 15:01:10 [INFO] [LWC] Disabling LWC v4.3.1 (b782-git-MANUAL) (November 24, 2012)
    2012-11-28 15:01:10 [INFO] [LWC] Flushing protection updates (2446)
    2012-11-28 15:02:54 [INFO] Read timed out
    2012-11-28 15:03:39 [INFO] Read timed out
    2012-11-28 15:04:53 [INFO] Read timed out
    2012-11-28 15:05:09 [INFO] Read timed out
    2012-11-28 15:05:29 [INFO] Read timed out
    2012-11-28 15:06:43 [INFO] Read timed out
    2012-11-28 15:07:15 [INFO] Read timed out
    2012-11-28 15:10:10 [INFO] Read timed out
    2012-11-28 15:11:55 [INFO] [IslandWorld] Disabling IslandWorld v1.2.9

    After 10 minutes next plugins stared to disabling.

    CB: git-Bukkit-1.4.5-R0.2-6-g286a945-b2496jnks (MC: 1.4.5) (Implementing API version 1.4.5-R0.3-SNAPSHOT)
    My lwc.db acctualy is 64mb...
    And LWC cache is on 100%
    And there is /lwc admin report screen: http://iv.pl/images/81180044918826252885.png

    Is realy annoying to wait 10 minutes to stop server :/
    I know that good way to fix that would be completly reset lwc.db but i cant do that cuz creative server without lwc protections on chests = disaster.

    Pls tell me what can i do to fix that.
     
  2. Offline

    Hidendra

    In plugins/LWC/core.yml please increase cacheSize to something greater than your protection size, e.g 30k and see if this helps :)
     
  3. Offline

    Symbiosis

    Your connection to the server could be low or you could have too many plugins running.
     
  4. Offline

    TnT

    xKarolusx
    Perhaps set your cache size to 200k and try again. Post here your results.
     
  5. Offline

    xKarolusx

    Actually i did that what Hidendra said (so it is on 30k now).
    My LWC cache is now on 72% but it didnt helped with faster server stop. :(
    LOGS:
    2012-11-29 15:01:13 [INFO] [LWC] Disabling LWC v4.3.1 (b782-git-MANUAL) (November 24, 2012)
    2012-11-29 15:01:13 [INFO] [LWC] Flushing protection updates (3362)
    2012-11-29 15:01:48 [INFO] Read timed out
    2012-11-29 15:02:24 [INFO] Read timed out
    2012-11-29 15:03:02 [INFO] Read timed out
    2012-11-29 15:03:42 [INFO] Read timed out
    2012-11-29 15:04:35 [INFO] Read timed out
    2012-11-29 15:05:07 [INFO] Read timed out
    2012-11-29 15:05:10 [INFO] Read timed out
    2012-11-29 15:05:14 [INFO] Read timed out
    2012-11-29 15:06:06 [INFO] Read timed out
    2012-11-29 15:06:36 [INFO] Read timed out
    2012-11-29 15:06:48 [INFO] Read timed out
    2012-11-29 15:07:06 [INFO] Read timed out
    2012-11-29 15:10:08 [INFO] Read timed out
    2012-11-29 15:15:07 [INFO] Read timed out
    2012-11-29 15:18:44 [INFO] [IslandWorld] Disabling IslandWorld v1.2.9

    ~18 minutes to stop the server >.<
    So if 30k did nothing then 200k will? If no, then what can I do else?
     
  6. Offline

    TnT

    I was going based on the idea that you had 130k in your cache before. I figure it doesn't hurt to try new things, right?
     
  7. Offline

    xKarolusx

    Ok now i have ~10% LWC cache on use, server restart in crontab is set up for 2 hours, so i will write new post after that restart, and we will see.

    Code:
    2012-11-29 20:01:14 [INFO] [LWC] Disabling LWC v4.3.1 (b782-git-MANUAL) (November 24, 2012)
    2012-11-29 20:01:14 [INFO] [LWC] Flushing protection updates (2187)
    2012-11-29 20:05:06 [INFO] Read timed out
    2012-11-29 20:06:30 [INFO] Read timed out
    2012-11-29 20:08:13 [INFO] Read timed out
    2012-11-29 20:08:53 [INFO] Read timed out
    2012-11-29 20:09:09 [INFO] Read timed out
    2012-11-29 20:10:07 [INFO] Read timed out
    2012-11-29 20:13:06 [INFO] Reached end of stream
    2012-11-29 20:15:06 [INFO] Read timed out
    2012-11-29 20:20:06 [INFO] Read timed out
    2012-11-29 20:20:40 [INFO] Read timed out
    2012-11-29 20:21:17 [INFO] Read timed out
    2012-11-29 20:21:20 [INFO] Read timed out
    2012-11-29 20:21:28 [INFO] Read timed out
    2012-11-29 20:22:13 [INFO] [IslandWorld] Disabling IslandWorld v1.2.9
    
    ~22 minutes to stop the server.

    So any other suggestions what can i do?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  8. Offline

    MikeA

    This also happens to me, but it only takes like 15 seconds :)
     
  9. Offline

    md_5

    Journal on the SQLITE or whatever database might be broken.
    On MySQL at least 30k protections is less than 60mb.
     
  10. Offline

    xKarolusx

    And? So can I move now my "broken" sqlite to mysql? And that can help?
     
  11. Offline

    noneandnonly

    I am running into the same problem. Always happening when I stop the server. I used "CTRL + C" the last time to stop that but it might break some protections or whatever so I guess it's better to just wait until it's done right?
    My lwc.db is about 6MB and my cache is on "10000". Should I also try setting that to a greater number? I'm running the most recent bleeding/dev build (#782). Can you give any suggestions what might fix this bug/problem?

    I've increased the cache to 100.000 for the next restart. If there area any other ideas out there, just tell me.

    Code:
    2012-11-30 12:14:23 [INFO] [LWC] Disabling LWC v4.3.1 (b782-git-MANUAL) (November 24, 2012)
    2012-11-30 12:14:23 [INFO] [LWC] Flushing protection updates (5023)
    2012-11-30 12:22:09 [INFO] Read timed out
    2012-11-30 12:26:12 [INFO] [RecipeManager] Disabling RecipeManager v1.26b
    --> 12 minutes

    Edit1: I would also like to hear what is actually happening when I'm going to CTRL+C stop the flushing process.

    Every advise is welcome
    Folas
     
  12. Offline

    TnT

  13. Offline

    xKarolusx

    I think that could work cuz i have tested it on my test server. But i will give you real answ. later.

    Btw.

    That guide is more clever:
    http://community.spiceworks.com/how_to/show/1468-how-to-fix-corrupt-sqlite-database

    noneandonly, if you have linux debian then use: echo .dump | sqlite3 your.db > your.sql
    Dont use: echo .dump | sqlite3.exe your.db > your.sql

    Nope, that isnt work...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  14. Offline

    noneandnonly

    I do not use debian but I'll try TnT's version and see if that works. You said "Nope that isnt work...", which way were you talking about? The one you posted or TnT posted?

    First attempt to fix it:
    1. "apt-get install sqlite3"
    2. "echo .dump | sqlite3 lwc.db > lwc.sql
    3. rename lwc.db to lwc.db.bak
    4. "sqlite3 -init lwc.sql lwc.db"
    5. If there is any error create a lwc.db file and remove all its content then try 4. again!
    Edit1: I'm not sure but I have the feeling that this step made me lose some protections. It might either be because I've interrupted the flushing process once or because of this step but I'd recommend everyone to create a chest with a protection first and then stop the server, do the steps above and then see if the protection of the chest is still there. If this is the case everything's still fine if not please go back to your lwc.db.bak!
    (I'm just speaking of my experience here, it could be my fault. This is just to ensure that there won't be any loses!)
     
  15. Offline

    xKarolusx


    My and his vesions = same versions.
    Its only that on my page that has more information, so if you are newbie in linux that would be better for you.
    You can try that but i think you wont fix that by that way.

    Already i transfered sql to mysql on my local server, and i will give you more info after 2h.

    I think that transfer from SQL to MySQL works, im not 100% sure yet but my last restart take 2 minutes so probably MySQL fixed that issue but i will post again 1 day later.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  16. Offline

    noneandnonly

    As I've said, I did the thing described above but after shutting down my server again it says:

    Code:
    14:11:36 [INFO] [LWC] Disabling LWC v4.3.1 (b782-git-MANUAL) (November 24, 2012)
    14:11:36 [INFO] [LWC] Flushing protection updates (6228)
    
    ~~> took about 15 minutes

    So that didn't help or fix anything. I've increased the cache, I've tried to fix my database with the steps above but nothing worked.
    The last thing I'm gonna try is downgrade LWC and then see if it changes anything because I'm using dev (#782) and that might have some bugs.
    I'll report about what helped me later if there is anything. Otherwise I'll have to look for something else... maybe going to MySQL or something.
     
  17. Offline

    xKarolusx

    Ok MySQL works great acctually.

    I had to wait more for chunk saving than LWC:
    Code:
    2012-12-02 15:01:13 [INFO] [LWC] Disabling LWC v4.3.1 (b782-git-MANUAL) (November 24, 2012)
    2012-12-02 15:01:13 [INFO] [LWC] Flushing protection updates (0)
    2012-12-02 15:01:14 [INFO] [IslandWorld] Disabling IslandWorld v1.2.9
    Code:
    2012-12-02 15:01:15 [INFO] Closing listening thread
    2012-12-02 15:01:15 [INFO] Saving chunks for level 'world'/Overworld
    2012-12-02 15:05:53 [INFO] Saving chunks for level 'world_nether'/Nether
    2012-12-02 15:05:55 [INFO] Saving chunks for level 'world_the_end'/The End
    2012-12-02 15:05:55 [INFO] Saving chunks for level 'wioska'/Overworld
    2012-12-02 15:05:55 [INFO] Saving chunks for level 'survivalg2'/Overworld
    2012-12-02 15:05:55 [INFO] Saving chunks for level 'survivalg3'/Overworld
    2012-12-02 15:05:55 [INFO] Saving chunks for level 'alaska'/Overworld
    2012-12-02 15:05:55 [INFO] Saving chunks for level 'port_royal'/Overworld
    2012-12-02 15:05:56 [INFO] Saving chunks for level 'atlantyda'/Overworld
    2012-12-02 15:05:56 [INFO] Saving chunks for level 'olimp'/Overworld
    2012-12-02 15:05:56 [INFO] Saving chunks for level 'minerals_world'/Overworld
    2012-12-02 15:06:23 [INFO] Saving chunks for level 'wyspy_spawn'/Overworld
    2012-12-02 15:06:26 [INFO] Saving chunks for level 'centrum_handlowe'/Overworld
    2012-12-02 15:06:32 [INFO] Saving chunks for level 'fun_world'/Overworld
    2012-12-02 15:06:38 [INFO] Saving chunks for level 'farmy'/Overworld
    2012-12-02 15:06:38 [INFO] Saving chunks for level 'wyspy'/Overworld
    2012-12-02 15:06:42 [INFO] Saving chunks for level 'testowy'/Overworld
    2012-12-02 15:06:42 [INFO] Stopping server
     
  18. Offline

    noneandnonly

    I've edited one of my posts (bold, red text :D) to make sure that people won't lose anything.
    I will also edit this post as soon as I can tell you about what happened after I downgraded...
     
  19. Offline

    xKarolusx

    I didnt loose any protections when i was doing that.
    But i told you, use MySQL, that fixing the problem. :p
     
  20. Offline

    noneandnonly

    Ok so I haven't changed anything except for my LWC version (to the recommended one) and it's fine again.
    I've converted to MySQL now again because after another restart it took about 40 minutes to shut down so I hope MySQL really fixes this.

    Just stick to the recommended LWC versions and everything will be fine. The flushing process was so fast that I'm too lazy to pick it out of my server.log :D

    I think thus this is fixed we can close it, right?
     
  21. Offline

    xKarolusx

    So you have changed your lwc version and i have changed SQL to MySQL and also works.
    So yea this topic can be closed.
     
    aa2202aa2202 likes this.
  22. mark post as solved ny editing name
     
  23. Offline

    noneandnonly

    Another change to my old post because after another shutdown it took about 40 minutes >.<
    I've moved to MySQL now as stated above.
     
Thread Status:
Not open for further replies.

Share This Page