too connection lost error



  • we have internet connection lost error every 2s.

    Our forum traffic:(screen shot)

    0_1503667949195_333d30cc-9d21-481d-9cc4-b0ad248cc380-image.png

    How to fix it?


  • Admin

    Hi there,

    Can you please provide the following information to help us debug?

    1. Server-side or client-side logs
    2. Server or client operating system (if applicable)
    3. NodeBB version and hash
      • To get the hash, run git rev-parse HEAD from the root of your NodeBB folder
    4. If applicable, theme versions
      • npm ls nodebb-theme-persona

    Thanks!



  • @julian

    1. I don't have any error in client-side or server-side, but all of users send message to us that they have "connection lost error too much"

    2. our server is debian server 8, nodebb config is:

    {                                                      
        "url": "http://forum.sanatisharif.ir",             
        "secret": "****",  
        "port": [4567,4568,4569],                          
        "bind_address":"127.0.0.1",                        
        "database": "mongo",                               
        "mongo": {                                         
            "host": "127.0.0.1",                           
            "port": "27017",                               
            "username": "***",                          
            "password": "***",                  
            "database": "nodebb"                           
        },                                                 
        "redis": {                                         
            "host": "127.0.0.1",                           
            "port": "6379",                                
            "password": "****",
            "database": "0"                                
        }                                                  
    }                                                      
    
    1. nodebb vertion: master version

    2. nodebb@1.5.3 /home/nodeBB/forum
      └── nodebb-theme-persona@5.0.32

    3. start nodebb using ./nodebb start command.



  • @julian
    AdminCP->errors:

    0_1503670645727_a299eba9-8c33-4366-a957-afc342817afb-image.png

    AdminCP->log:

    25/8 18:24:00 [14550] - error:  MongoError: WiredTigerIndex::insert: key too large to index, failing  1653 { : "errors:404", : "/A%20%20%20%20%20%20%20%DA%A9%D8%A7%D8%B1%D9%86%D8%A7%D9%85%D9%87%20%D9%87%D8%A7%DB%8C%20%D8%A7%D8%B2%D9%85%D9%88%D9%86%D9%87%D8%A7%DB%8C%20%D8%A2%D8%..." }
        at Function.MongoError.create (/home/nodeBB/forum/node_modules/mongodb-core/lib/error.js:31:11)
        at /home/nodeBB/forum/node_modules/mongodb-core/lib/connection/pool.js:497:72
        at authenticateStragglers (/home/nodeBB/forum/node_modules/mongodb-core/lib/connection/pool.js:443:16)
        at null.messageHandler (/home/nodeBB/forum/node_modules/mongodb-core/lib/connection/pool.js:477:5)
        at Socket.<anonymous> (/home/nodeBB/forum/node_modules/mongodb-core/lib/connection/connection.js:321:22)
        at emitOne (events.js:77:13)
        at Socket.emit (events.js:169:7)
        at readableAddChunk (_stream_readable.js:153:18)
        at Socket.Readable.push (_stream_readable.js:111:10)
        at TCP.onread (net.js:536:20)
    25/8 18:41:44 [14550] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    
    25/8 18:41:44 [15472] - info: Initializing NodeBB v1.5.3 http://forum.sanatisharif.ir
    [deprecated] `String.prototype.rtrim` is deprecated as of NodeBB v1.5; use `utils.rtrim` instead.
    [deprecated] `String.prototype.rtrim` is deprecated as of NodeBB v1.5; use `utils.rtrim` instead.
    [deprecated] `String.prototype.rtrim` is deprecated as of NodeBB v1.5; use `utils.rtrim` instead.
    [deprecated] `String.prototype.rtrim` is deprecated as of NodeBB v1.5; use `utils.rtrim` instead.
    25/8 18:41:46 [15472] - info: [socket.io] Restricting access to origin: http://forum.sanatisharif.ir:*
    25/8 18:41:46 [15479] - info: [socket.io] Restricting access to origin: http://forum.sanatisharif.ir:*
    25/8 18:41:46 [15494] - info: [socket.io] Restricting access to origin: http://forum.sanatisharif.ir:*
    25/8 18:41:47 [15484] - info: [socket.io] Restricting access to origin: http://forum.sanatisharif.ir:*
    25/8 18:41:48 [15494] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `action:flag.create` is deprecated, please use `action:flags.create` instead.
    25/8 18:41:48 [15472] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `action:flag.create` is deprecated, please use `action:flags.create` instead.
    25/8 18:41:48 [15479] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `action:flag.create` is deprecated, please use `action:flags.create` instead.
    
    25/8 18:41:48 [15472] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-plugin-markdown
      * nodebb-plugin-sso-instagram
      * nodebb-plugin-blog-comments
    
    25/8 18:41:48 [15484] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `action:flag.create` is deprecated, please use `action:flags.create` instead.
    


  • only mobile users have such problem.


  • Admin

    Hm, that's interesting...

    While your forum is running, can you run ./nodebb log and keep it running for awhile? It looks like NodeBB is crashing, and you are getting that MongoError whenever it happens.

    Please confirm that this is always the same error you see.



  • @julian I have this warning message

    26/8 01:14:51 [22766] - warn: [nodebb-plugin-blog-comments] Origin (http://sanatisharif.ir) does not match hostUrls: sanatisharif.ir, orduetalaee.ir
    

    and this error message:

    26/8 01:00:00 [22765] - error:  MongoError: WiredTigerIndex::insert: key too large to index, failing  1581 { : "errors:404", : "/A%20%20%20%20%20%20%20%DA%A9%D8%A7%D8%B1%D9%86%D8%A7%D9%85%D9%87%20%D9%87%D8%A7%DB%8C%20%D8%A7%D8%B2%D9%85%D9%88%D9%86%D9%87%D8%A7%DB%8C%20%D8%A2%D8%..." }
        at Function.MongoError.create (/home/nodeBB/forum/node_modules/mongodb-core/lib/error.js:31:11)
        at /home/nodeBB/forum/node_modules/mongodb-core/lib/connection/pool.js:497:72
        at authenticateStragglers (/home/nodeBB/forum/node_modules/mongodb-core/lib/connection/pool.js:443:16)
        at null.messageHandler (/home/nodeBB/forum/node_modules/mongodb-core/lib/connection/pool.js:477:5)
        at Socket.<anonymous> (/home/nodeBB/forum/node_modules/mongodb-core/lib/connection/connection.js:321:22)
        at emitOne (events.js:77:13)
        at Socket.emit (events.js:169:7)
        at readableAddChunk (_stream_readable.js:153:18)
        at Socket.Readable.push (_stream_readable.js:111:10)
        at TCP.onread (net.js:536:20)
    

    But why only mobile users have such a problem(Connection lost) ??



  • @julian new error after enabling a plugin (ignore-users pluging)

    26/8 01:39:19 [30335] - error:  TypeError: callFn.apply is not a function
        at /home/nodeBB/forum/node_modules/async/dist/async.js:421:16
        at next (/home/nodeBB/forum/node_modules/async/dist/async.js:5278:29)
        at /home/nodeBB/forum/node_modules/async/dist/async.js:906:16
        at /home/nodeBB/forum/src/topics/unread.js:146:5
        at nextTask (/home/nodeBB/forum/node_modules/async/dist/async.js:5273:14)
        at next (/home/nodeBB/forum/node_modules/async/dist/async.js:5280:9)
        at /home/nodeBB/forum/node_modules/async/dist/async.js:906:16
        at fireFilterHook (/home/nodeBB/forum/src/plugins/hooks.js:112:11)
        at Object.Plugins.fireHook (/home/nodeBB/forum/src/plugins/hooks.js:96:4)
        at /home/nodeBB/forum/src/topics/unread.js:138:13
        at nextTask (/home/nodeBB/forum/node_modules/async/dist/async.js:5273:14)
        at next (/home/nodeBB/forum/node_modules/async/dist/async.js:5280:9)
        at /home/nodeBB/forum/node_modules/async/dist/async.js:906:16
        at /home/nodeBB/forum/node_modules/async/dist/async.js:421:16
        at next (/home/nodeBB/forum/node_modules/async/dist/async.js:5278:29)
        at /home/nodeBB/forum/node_modules/async/dist/async.js:906:16
    

  • Admin

    ... why are you activating new plugins?



  • @julian said in too connection lost error:

    ... why are you activating new plugins?

    I disabled it again, we needed to nodebb-ignore-users plugin.


  • Global Moderator

    I assume that the reason he asked is because you were already having issues, so why introduce even more variables into the mix? Fix one issue before moving on to the next.



  • @pitaj @julian

    at the time, I unistalled it immediately and now I am waiting for you to say what to do.
    Thanks a lot



  • @julian
    new error

    28/8 02:35:04 [27587] - error:  TypeError: Cannot read property 'toString' of null
        at /home/nodeBB/forum/node_modules/nodebb-plugin-mentions/library.js:135:41
        at Array.filter (native)
        at /home/nodeBB/forum/node_modules/nodebb-plugin-mentions/library.js:128:83
        at Array.forEach (native)
        at /home/nodeBB/forum/node_modules/nodebb-plugin-mentions/library.js:127:33
        at /home/nodeBB/forum/node_modules/async/dist/async.js:3838:9
        at /home/nodeBB/forum/node_modules/async/dist/async.js:421:16
        at iterateeCallback (/home/nodeBB/forum/node_modules/async/dist/async.js:928:24)
        at /home/nodeBB/forum/node_modules/async/dist/async.js:906:16
        at /home/nodeBB/forum/node_modules/async/dist/async.js:3835:13
        at /home/nodeBB/forum/node_modules/nodebb-plugin-mentions/library.js:231:4
        at /home/nodeBB/forum/node_modules/async/dist/async.js:1074:9
        at /home/nodeBB/forum/node_modules/async/dist/async.js:421:16
        at iteratorCallback (/home/nodeBB/forum/node_modules/async/dist/async.js:998:13)
        at /home/nodeBB/forum/node_modules/async/dist/async.js:906:16
        at /home/nodeBB/forum/node_modules/async/dist/async.js:1071:13
    


  • @julian
    git head:
    b2c16b2ba0aa0e91b55692fb59a809d8d6c551f9



  • up..............


  • Admin

    Disable all plugins except those that NodeBB requires to run (mentions, markdown, composer-default, widget-essentials)



  • @julian said in too connection lost error:

    Disable all plugins except those that NodeBB requires to run (mentions, markdown, composer-default, widget-essentials)

    we are on production mod not dev!!!
    every thing was good about 3 month ago with this plugins that we are use:

    1. nodebb-plugin-assign-newuser-to-group
    2. nodebb-plugin-browsing-users
    3. nodebb-plugin-composer-default
    4. nodebb-plugin-emailer-mailgun
    5. nodebb-plugin-emoji-apple
    6. nodebb-plugin-emoji-extended
    7. nodebb-plugin-emoji-one
    8. nodebb-plugin-google-analytics
    9. nodebb-plugin-katex
    10. nodebb-plugin-markdown
    11. nodebb-plugin-mega-colors
    12. nodebb-plugin-mentions
    13. nodebb-plugin-question-and-answer
    14. nodebb-plugin-recent-cards
    15. nodebb-plugin-shortcuts
    16. nodebb-plugin-solr
    17. nodebb-plugin-soundpack-default
    18. nodebb-plugin-spam-be-gone
    19. nodebb-plugin-sso-google
    20. nodebb-plugin-sso-instagram
    21. nodebb-plugin-topic-tags
    22. nodebb-rewards-essentials
    23. nodebb-theme-persona
    24. nodebb-widget-essentials

  • Admin

    @sanatisharif it doesn't matter, you will want to set up a duplicate instance for these sorts of things before pushing to live.

    You can set one up now for debug.



  • I change this line in config.json fixes my problem

    "port": [4567,4568,4569]
    

    to

    "port": "4567"
    

    why we can't use nodebb in cluster mod ?


  • Admin

    There is no problem with using nodebb in a cluster setup, so this config change is likely unrelated


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.