I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Version of plugin 4.0 gives error and wp stops working.

dashed-slug.net Forums General discussion Version of plugin 4.0 gives error and wp stops working.

Tagged: , , ,

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #5683
    Anonymous
    Inactive

    after upgrading to the latest version the add-on stopped working well.
    Now it is practically impossible to access wp-admin, very very slow and when I get access it indicates the following error:

    MySQL server has gone away in /homepages …. wp-includes/wp-db.php on line 1924
    Error reading result set’s header in /homepages/ … /wp-includes/wp-db.php on line 1924

    1923 if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
    1924 $this->result = mysqli_query( $this->dbh, $query );
    1925 } elseif ( ! empty( $this->dbh ) ) {
    1926 $this->result = mysql_query( $query, $this->dbh );

    If I deactivate the plugin the page works correctly and the error disappears

    I await your response, thank you.

    #5684
    alexg
    Keymaster

    Hello,

    Thank you for reporting this, it sounds like an annoying issue.

    1. Could you please look into the debug log where you found this error and see if the complete stack trace is available? A stack trace is a list of files, line numbers and functions that caused the error. It should be below the error you reported.

    2. Also, is it possible for you to deactivate other plugins (mostly caching and security plugins) and see if the latest version 4.0.0 behaves then? It is likely that this is some interaction with a plugin you’re running, so this would help pinpoint it down.

    Lastly, you can revert to the previous version, 3.9.4 until we find a fix. But please try to give me the two pieces of information I ask for, without it I wouldn’t know where to look, as I have not yet encounter this error myself.

    thank you

    #5685
    alexg
    Keymaster

    In addition to the above, I am currently reading on the error “Mysql Server has gone away”. It is usually solved if you increase the max_allowed_packet variable in MySQL. It is possible that simply editing my.ini and setting it to 16 or 24 Megs would solve the issue:

    [mysqld]
    max_allowed_packet=24M

    It’s worth a try, based on the articles I just read. If you are unable to do the change yourself, you can ask your host to do this.

    #5686
    Anonymous
    Inactive

    436/5000
    I have removed the error in the following way:

    I added these lines in wp-db.php just below
    $ this-> ready = true;

    // WP Query Gone Away Error Fix
    $ this-> query (“set session wait_timeout = 600”);

    But the plugin still does not work. Another fact is that it only stops working back office.

    In the front office it works correctly.

    Now as administrator nothing works, I can only access by removing the plugin from ftp.

    #5687
    alexg
    Keymaster

    I believe that by increasing the timeout limit on MySQL you are only masking the problem, not solving it. It’s simply the case that now PHP times out before MySQL.

    Were you able to locate the stack trace for the original error?

    #5688
    Anonymous
    Inactive

    Hello Alex,

    I dont know if the issue I am facing could be the same commented here. I just realized that the extension stopped working after receiving error messages from the cron task manager. I checked in backend and wallets disappeared from the menu, and when I try to access to it from the installed extensions list, I get “Sorry, you are not alloed to access…”.

    I duplicated to another test install site, and I cant find the issue. In this case, I disabled external cron task, letting wp cron enabled.

    If I revert to core V 3.9.4, I suppose that I have to revert also the exchnge version, right?

    Thank you in advance

    Best regards

    #5689
    alexg
    Keymaster

    It is possible that the new exchange rates code (for coinmarketcap and coingecko) is using more memory than it did before.

    Unless someone shows me error messages, there is not much I can investigate further. But what I can do, is add some crash-detection code to the plugin. In the next patch the plugin will collect information in case of a crash, and will observe peak memory usage, and whether the cron tasks completed normally or not. So this might help with finding the root cause. I have already started working on this.

    If you decide to downgrade, then yes, in this case, you would have to also downgrade to the previous version of the Exchange, since the latest one requires version 4.0.0.

    with regards

    #5690
    Anonymous
    Inactive

    Thanks Alex for your quick reply.

    Yesterday I faced an issue regarding the db, I was getting Error establishing database conexion, so I contacted the hoster and told me that there was some mysql surcharging the execution.

    I am looking into it in order to find something more usefull as informartion.

    Thank you alex

    #5691
    alexg
    Keymaster

    Thanks, if you can do that, it would be very helpful, as this matches with what frodogrguez reported.

    If you or your host can enable the MySQL Slow Query Log then that would show any slow queries.

    Alternatively there could be clues in MySQL logs, PHP logs or even WordPress logs.

    #5692
    alexg
    Keymaster

    I believe I may have located a possible source of this problem.

    Due to recent changes, the plugin queries the APIs for CoinGecko and CoinMarketCap in a different, better way. This however is possibly causing a large amount of data to be downloaded in certain cases. This data is saved in the DB even in most cases when it does not need to be saved.

    If possible, can you try editing the file includes/rates.php, and change line 712 from:

    if ( is_string( $result ) ) {
    to
    if ( is_string( $result ) && $cache_seconds ) {

    If I am correct then this should make a huge difference in memory usage. If someone can give it a try I would like to know if it solved the problem.

    If not, we will have to see in the next release, which will show debug info on memory statistics.

    #5694
    Anonymous
    Inactive

    finally I have access to the admin, I started to disconnect the daemons and note that there was one that did not have access.

    As indicated in the previous message there was a considerable increase in memory consumption and at times I had no memory, my hosting provider also increased it.

    after increasing the memory and deactivating the daemon I can access without problems and it seems that almost everything works.

    the only thing I see that does not work are the withdrawals, the valid but remain pending.

    I tried to activate the cron on the hostin without success and with worpress it does not work either.

    I await your response and as always many thanks for your support.

    #5695
    alexg
    Keymaster

    Hello,

    Thank you. I believe I have a better understanding of what’s going on and why not everyone has this problem.

    It has to do with memory limits but don’t increase your memory yet. I will shortly release a patch that does two things:

    1. Makes it easier to detect such errors.

    2. Uses less memory and database space.

    Hopefully this will resolve the issue. I will contact you again after the patch is out, later today. In the meantime, if you want, you can attempt to apply the patch I mentioned above.

    thanks for all your help

    #5699
    Anonymous
    Inactive

    Thank you Alex for your help.

    I reverted to previous version, and now strangely the cron task seems failling. I am going to update again to 4.0.0 and test the patch you proposed.

    Looking forwad to the release later. Greatly appreciated Alex!

    #5701
    Anonymous
    Inactive

    Now the only thing that does not work are the withdrawals.

    I have tested with the worpress cron and with a cron task in the hosting and they process, they remain pending.

    #5707
    alexg
    Keymaster

    OK, version 4.0.1 is out with a few performance and memory improvements.

    First of all, please check if it solves all the issues and let me know.

    If the problem with withdrawals remains:

    1. please go to “Wallets” -> “Cron job” -> “Verbose log output (debug)” and capture the log output during a log run if possible.

    2. please send me the information found in the admin dashboard under “Bitcoin and Altcoin Wallets”.

    Thank you both for your help in debugging this! I appreciate it.

    with regards

Viewing 15 posts - 1 through 15 (of 26 total)
  • You must be logged in to reply to this topic.