Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server got "java.net.SocketException: Broken pipe" #6664

Closed
1 of 5 tasks
kwoxer opened this issue Sep 7, 2016 · 53 comments
Closed
1 of 5 tasks

Server got "java.net.SocketException: Broken pipe" #6664

kwoxer opened this issue Sep 7, 2016 · 53 comments
Assignees
Labels

Comments

@kwoxer
Copy link

kwoxer commented Sep 7, 2016

OrientDB Version, operating system, or hardware.

Operating System

  • Linux
  • MacOSX
  • Windows
  • Other Unix
  • Other, name?

Expected behavior and actual behavior

Expected : Server should run well for ever
Actual: Server got this exception after 2 days running well

Steps to reproduce the problem

  1. just having 500MB memory
  2. run server.sh on Linux/Ubuntu

Error message:

java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.writeContent(OChunkedResponse.java:58)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.write(OChunkedResponse.java:39)
    at java.io.OutputStream.write(OutputStream.java:116)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
    at java.io.Writer.write(Writer.java:157)
    at java.io.Writer.append(Writer.java:227)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.formatMultiValue(OHttpResponse.java:408)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecordsOnStream(OHttpResponse.java:355)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.access$000(OHttpResponse.java:43)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:330)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:500)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecords(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:222)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:188)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:179)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandFunction.handleResult(OServerCommandFunction.java:47)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandAbstractLogic.execute(OServerCommandAbstractLogic.java:81)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-09-04 17:11:57:616 SEVER Internal server error:
java.lang.ArrayIndexOutOfBoundsException: 8192 [ONetworkProtocolHttpDb]
@tglman
Copy link
Member

tglman commented Sep 7, 2016

hi @kwoxer,

This means just that a client close the connection while the server was sending data, it does not cause any harm, you can ignore this.

Regards

@kwoxer
Copy link
Author

kwoxer commented Sep 9, 2016

Mhh well, it seems to be online just for some hours. Offline since 2 days as it seems.

The log is also very empty:

2016-09-07 10:22:05:458 INFO  Loading configuration from: /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2016-09-07 10:22:06:671 INFO  OrientDB Server v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000) is starting up... [OServer]
2016-09-07 10:22:06:706 INFO  Databases directory: /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/databases [OServer]
2016-09-07 10:22:08:797 INFO  Listening binary connections on 0.0.0.0:2424 (protocol v.36, socket=default) [OServerNetworkListener]
2016-09-07 10:22:08:824 INFO  Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2016-09-07 10:22:08:898 INFO  Installing dynamic plugin 'studio-2.2.zip'... [OServerPluginManager]
2016-09-07 10:22:08:936 INFO  ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
2016-09-07 10:22:08:937 INFO  OServerConfigAuthenticator is active [OServerConfigAuthenticator]
2016-09-07 10:22:08:968 INFO  OSystemUserAuthenticator is active [OSystemUserAuthenticator]
2016-09-07 10:22:09:160 INFO  Installed GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2016-09-07 10:22:09:161 INFO  [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2016-09-07 10:22:09:210 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2016-09-07 10:22:09:254 INFO  OrientDB Studio available at http://128.199.61.240:2480/studio/index.html [OServer]
2016-09-07 10:22:09:259 INFO  OrientDB Server is active v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000). [OServer]

I gonna let the server open via putty, maybe there is some more info when it crashes.

Or is there another way to investigate more about this?

Btw this is the server.sh log when I restart the server:


           .
          .`        `
          ,      `:.
         `,`    ,:`
         .,.   :,,
         .,,  ,,,
    .    .,.:::::  ````                                 :::::::::     :::::::::
    ,`   .::,,,,::.,,,,,,`;;                      .:    ::::::::::    :::    :::
    `,.  ::,,,,,,,:.,,.`  `                       .:    :::      :::  :::     :::
     ,,:,:,,,,,,,,::.   `        `         ``     .:    :::      :::  :::     :::
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     :::
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     :::
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     :::
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     :::
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::
           ,,:` `,,.
          ,,,    .,`
         ,,.     `,                                          GRAPH DATABASE
       ``        `.
                 ``                                          orientdb.com
                 `
removing old pid file /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/bin/orient.pid

2016-09-09 13:13:46:589 INFO  Loading configuration from: /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2016-09-09 13:13:47:575 INFO  OrientDB Server v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000) is starting up... [OServer]
2016-09-09 13:13:47:596 INFO  Databases directory: /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/databases [OServer]
2016-09-09 13:13:49:084 INFO  Listening binary connections on 0.0.0.0:2424 (protocol v.36, socket=default) [OServerNetworkListener]
2016-09-09 13:13:49:113 INFO  Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2016-09-09 13:13:49:173 INFO  Installing dynamic plugin 'studio-2.2.zip'... [OServerPluginManager]
2016-09-09 13:13:49:200 INFO  ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
2016-09-09 13:13:49:208 INFO  OServerConfigAuthenticator is active [OServerConfigAuthenticator]
2016-09-09 13:13:49:211 INFO  OSystemUserAuthenticator is active [OSystemUserAuthenticator]
2016-09-09 13:13:49:287 INFO  Installed GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2016-09-09 13:13:49:289 INFO  [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2016-09-09 13:13:49:297 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2016-09-09 13:13:49:308 INFO  OrientDB Studio available at http://128.199.61.240:2480/studio/index.html [OServer]
2016-09-09 13:13:49:309 INFO  OrientDB Server is active v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000). [OServer]
2016-09-09 13:14:02:414 WARNI {db=OSystem} Storage 'OSystem' was not closed properly. Will try to recover from write ahead log [OLocalPaginatedStorage]
2016-09-09 13:14:02:417 INFO  {db=OSystem} Looking for last checkpoint... [OLocalPaginatedStorage]
2016-09-09 13:14:02:499 INFO  {db=OSystem} Found FUZZY checkpoint. [OLocalPaginatedStorage]
2016-09-09 13:14:02:506 INFO  {db=OSystem} Data restore procedure from FUZZY checkpoint is started. [OLocalPaginatedStorage]
2016-09-09 13:14:02:523 WARNI {db=OSystem} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=460547}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-09 13:14:02:532 WARNI {db=OSystem} Record OFuzzyCheckpointStartRecord{lsn=OLogSequenceNumber{segment=0, position=460554}} com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointStartRecord{lsn=null, previousCheckpoint=OLogSequenceNumber{segment=0, position=460507}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-09 13:14:02:533 WARNI {db=OSystem} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=460594}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-09 13:14:02:539 INFO  {db=OSystem} Storage data recover was completed [OLocalPaginatedStorage]
2016-09-09 13:14:04:268 WARNI {db=arda} Storage 'arda' was not closed properly. Will try to recover from write ahead log [OLocalPaginatedStorage]
2016-09-09 13:14:04:271 INFO  {db=arda} Looking for last checkpoint... [OLocalPaginatedStorage]
2016-09-09 13:14:04:272 INFO  {db=arda} Found FUZZY checkpoint. [OLocalPaginatedStorage]
2016-09-09 13:14:04:272 INFO  {db=arda} Data restore procedure from FUZZY checkpoint is started. [OLocalPaginatedStorage]
2016-09-09 13:14:04:273 WARNI {db=arda} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=12276397}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-09 13:14:04:274 WARNI {db=arda} Record OFuzzyCheckpointStartRecord{lsn=OLogSequenceNumber{segment=0, position=12276404}} com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointStartRecord{lsn=null, previousCheckpoint=OLogSequenceNumber{segment=0, position=12276357}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-09 13:14:04:282 WARNI {db=arda} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=12276444}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-09 13:14:04:282 INFO  {db=arda} Storage data recover was completed [OLocalPaginatedStorage]

Let's see when it crashes...

@tglman
Copy link
Member

tglman commented Sep 9, 2016

Hi @kwoxer,

Ok, let us know if you have further problems.

Regards

@kwoxer
Copy link
Author

kwoxer commented Sep 12, 2016

So today it some how stopped again. But sadly nothing in the logs =/

This is what I have in the open server.sh window via ssh shell. Accessed via screen:

screen -r
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     :::
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     :::
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     :::
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     :::
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::
           ,,:` `,,.
          ,,,    .,`
         ,,.     `,                                          GRAPH DATABASE
       ``        `.
                 ``                                          orientdb.com
                 `
removing old pid file /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/bin/orient.pid

2016-09-09 22:24:35:585 INFO  Loading configuration from: /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2016-09-09 22:24:36:527 INFO  OrientDB Server v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000) is starting up... [OServer]
2016-09-09 22:24:36:547 INFO  Databases directory: /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/databases [OServer]
2016-09-09 22:24:37:772 INFO  Listening binary connections on 0.0.0.0:2424 (protocol v.36, socket=default) [OServerNetworkListener]
2016-09-09 22:24:37:788 INFO  Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2016-09-09 22:24:37:835 INFO  Installing dynamic plugin 'studio-2.2.zip'... [OServerPluginManager]
2016-09-09 22:24:37:850 INFO  ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
2016-09-09 22:24:37:852 INFO  OServerConfigAuthenticator is active [OServerConfigAuthenticator]
2016-09-09 22:24:37:860 INFO  OSystemUserAuthenticator is active [OSystemUserAuthenticator]
2016-09-09 22:24:37:943 INFO  Installed GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2016-09-09 22:24:37:944 INFO  [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2016-09-09 22:24:37:957 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2016-09-09 22:24:37:965 INFO  OrientDB Studio available at http://128.199.61.240:2480/studio/index.html [OServer]
2016-09-09 22:24:37:967 INFO  OrientDB Server is active v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000). [OServer]Killed

As you see at the end I got:
Killed
No idea what this stands for?!

I gonna start the server.sh now again. But as you have seen, it ran again 2-3 days. So it is repreducable!

Any ideas?

@andrii0lomakin
Copy link
Member

@kwoxer I suppose that your close system application because big usage of system resources like memory so you should decrease memory settings to avoid such problems in future.

@andrii0lomakin
Copy link
Member

Also I do suggest to update to 2.2.10 version of database.

@kwoxer
Copy link
Author

kwoxer commented Sep 13, 2016

Okay. So when again "killed" I try to set lower memory stuff. Is half of current okay? Or trying to give a bit more?

Currently the server is still running. :)

@andrii0lomakin
Copy link
Member

Well not the half, I think about 3/4 of current memory, do not forget to decrease disk cache size and memory chunk size too.

@kwoxer
Copy link
Author

kwoxer commented Sep 16, 2016

So the last run worked about 3 days. Now crashed.

I gonna try it with 3/4 memory now. So instead of:

if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
    ORIENTDB_OPTS_MEMORY="-Xms64m -Xmx128m"
fi

if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
    JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=200g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi

# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
    ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=128 -Dmemory.chunk.size=33554432"
fi

now:

if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
    ORIENTDB_OPTS_MEMORY="-Xms50m -Xmx100m"
fi

if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
    JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=150g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi

# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
    ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=100 -Dmemory.chunk.size=25000000"
fi

@kwoxer
Copy link
Author

kwoxer commented Sep 19, 2016

Well again crashed/KILLED after 3 days. Also with lower settings:

2016-09-16 07:44:51:638 INFO  Installed GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2016-09-16 07:44:51:643 INFO  [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2016-09-16 07:44:51:652 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2016-09-16 07:44:51:659 INFO  OrientDB Studio available at http://128.199.61.240:2480/studio/index.html [OServer]
2016-09-16 07:44:51:660 INFO  OrientDB Server is active v2.2.9-SNAPSHOT (build file_close_detection@rb5e81d839d4e853c25379e53cd1eabe57badc6b3; 2016-08-29 11:10:28+0000). [OServer]
2016-09-16 07:53:17:773 WARNI {db=OSystem} Storage 'OSystem' was not closed properly. Will try to recover from write ahead log [OLocalPaginatedStorage]
2016-09-16 07:53:17:775 INFO  {db=OSystem} Looking for last checkpoint... [OLocalPaginatedStorage]
2016-09-16 07:53:17:800 INFO  {db=OSystem} Found FUZZY checkpoint. [OLocalPaginatedStorage]
2016-09-16 07:53:17:802 INFO  {db=OSystem} Data restore procedure from FUZZY checkpoint is started. [OLocalPaginatedStorage]
2016-09-16 07:53:17:807 WARNI {db=OSystem} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=520972}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-16 07:53:17:813 WARNI {db=OSystem} Record OFuzzyCheckpointStartRecord{lsn=OLogSequenceNumber{segment=0, position=520979}} com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointStartRecord{lsn=null, previousCheckpoint=OLogSequenceNumber{segment=0, position=520932}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-16 07:53:17:814 WARNI {db=OSystem} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=521019}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-16 07:53:17:819 INFO  {db=OSystem} Storage data recover was completed [OLocalPaginatedStorage]
2016-09-16 07:53:18:000 SEVER {db=OSystem} Previous maximum cache size was 1740 current maximum cache size is 1360. Cache state for storage /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/databases/OSystem will not be restored. [O2QCache]
2016-09-16 07:53:18:557 WARNI {db=arda} Storage 'arda' was not closed properly. Will try to recover from write ahead log [OLocalPaginatedStorage]
2016-09-16 07:53:18:559 INFO  {db=arda} Looking for last checkpoint... [OLocalPaginatedStorage]
2016-09-16 07:53:18:559 INFO  {db=arda} Found FUZZY checkpoint. [OLocalPaginatedStorage]
2016-09-16 07:53:18:560 INFO  {db=arda} Data restore procedure from FUZZY checkpoint is started. [OLocalPaginatedStorage]
2016-09-16 07:53:18:561 WARNI {db=arda} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=12336797}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-16 07:53:18:563 WARNI {db=arda} Record OFuzzyCheckpointStartRecord{lsn=OLogSequenceNumber{segment=0, position=12336804}} com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointStartRecord{lsn=null, previousCheckpoint=OLogSequenceNumber{segment=0, position=12336757}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-16 07:53:18:567 WARNI {db=arda} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=12336844}} will be skipped during data restore [OLocalPaginatedStorage]
2016-09-16 07:53:18:567 INFO  {db=arda} Storage data recover was completed [OLocalPaginatedStorage]
2016-09-16 07:53:18:600 SEVER {db=arda} Previous maximum cache size was 1740 current maximum cache size is 1360. Cache state for storage /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/databases/arda will not be restored. [O2QCache]Killed

Now I gonna try with 1/2 memory. Please tell me if you see something weird. Thanks:

if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
    ORIENTDB_OPTS_MEMORY="-Xms25m -Xmx50m"
fi

if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
    JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=100g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi

# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
    ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=50 -Dmemory.chunk.size=15000000"
fi

@kwoxer
Copy link
Author

kwoxer commented Sep 23, 2016

Okay, OrientDB still running. Already 4 days. I'm checking now every day.

I'm updating the state here:
Checked on 23.09. - OK
Checked on 25.09. - OK
Checked on 27.09. - OK
Checked on 29.09. - OK
Checked on 30.09. - ERROR

@lvca
Copy link
Member

lvca commented Sep 23, 2016

@kwoxer any news on this?

@kwoxer
Copy link
Author

kwoxer commented Sep 27, 2016

Server still running. As you see I updated my last post here. Will repost new config here in the case the server is crashing again.

But anyway it would be nice to know why it now seems to run well. As said I'm now on 50% memory. But maybe there is one settings of the many that was the main reason. I don't know. :)

@kwoxer
Copy link
Author

kwoxer commented Sep 30, 2016

Ok just for you info. This morning I checked the state. All was fine.

But checked right now, and it's down. So today the server crashed.

This means, it ran 7 days with the 1/2 memory settings.

I'm going down to 1/3 memory now. But could someone give me tips what to especially change?

if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
    ORIENTDB_OPTS_MEMORY="-Xms15m -Xmx35m"
fi

if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
    JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=40g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi

# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
    ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=40 -Dmemory.chunk.size=10000000"
fi

@kwoxer
Copy link
Author

kwoxer commented Sep 30, 2016

Cool and here is something I got from the log, maybe it helps:

2016-09-19 19:04:01:983 SEVER {db=arda} Previous maximum cache size was 1740 current maximum cache size is 680. Cache state for storage /home/ubuntu/orientdb-community-2.2.9-SNAPSHOT/databases/arda will not be restored. [O2QCache]Error on loading resource /studio/styles/main.css
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:95)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:479)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:134)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Error on loading resource /studio/scripts/scripts.js
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:95)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:479)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:134)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-09-24 01:27:24:030 WARNI ->144.76.236.183: Command not found: HEAD. [ONetworkProtocolHttpDb]$ANSI{green {db=arda}} Error transforming record #-1:-1 to JSON
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.writeContent(OChunkedResponse.java:58)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.write(OChunkedResponse.java:39)
    at java.io.OutputStream.write(OutputStream.java:116)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
    at java.io.Writer.write(Writer.java:157)
    at java.io.Writer.append(Writer.java:227)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.formatMultiValue(OHttpResponse.java:408)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecordsOnStream(OHttpResponse.java:355)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.access$000(OHttpResponse.java:43)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:330)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:500)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecords(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:222)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:188)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:179)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandFunction.handleResult(OServerCommandFunction.java:47)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandAbstractLogic.execute(OServerCommandAbstractLogic.java:81)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-09-27 03:38:58:267 SEVER Internal server error:
java.lang.ArrayIndexOutOfBoundsException: 8192 [ONetworkProtocolHttpDb]Error on loading resource /studio/scripts/scripts.js
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.flush(OHttpResponse.java:550)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:483)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:134)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Error on loading resource /studio/components/es5-shim/es5-shim.js
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.flush(OHttpResponse.java:550)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:483)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:137)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Error on loading resource /studio/components/json3/lib/json3.min.js
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.flush(OHttpResponse.java:550)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:483)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:137)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-09-27 21:22:48:606 WARNI ->5.228.35.210: Command not found: GET.studio/fonts/glyphicons-halflings-regular.eot [ONetworkProtocolHttpDb]
2016-09-27 21:22:49:105 WARNI ->5.228.35.210: Command not found: GET.studio/fonts/fontawesome-webfont.eot [ONetworkProtocolHttpDb]
2016-09-27 21:22:49:634 WARNI ->5.228.35.210: Command not found: GET.studio/styles/iconpicker.eot [ONetworkProtocolHttpDb]
2016-09-27 21:22:50:323 WARNI ->5.228.35.210: Command not found: GET.studio/styles/icons/tl-icons.eot [ONetworkProtocolHttpDb]
2016-09-27 21:22:50:684 WARNI ->5.228.35.210: Command not found: GET.studio/fonts/fontello.eot [ONetworkProtocolHttpDb]$ANSI{green {db=arda}} Error transforming record #-1:-1 to JSON
java.net.SocketException: Connection timed out
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.writeContent(OChunkedResponse.java:58)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.write(OChunkedResponse.java:39)
    at java.io.OutputStream.write(OutputStream.java:116)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
    at java.io.Writer.write(Writer.java:157)
    at java.io.Writer.append(Writer.java:227)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.formatMultiValue(OHttpResponse.java:408)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecordsOnStream(OHttpResponse.java:355)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.access$000(OHttpResponse.java:43)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:330)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:500)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecords(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:222)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:188)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:179)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandFunction.handleResult(OServerCommandFunction.java:47)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandAbstractLogic.execute(OServerCommandAbstractLogic.java:81)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-09-30 10:35:26:904 SEVER Internal server error:
java.lang.ArrayIndexOutOfBoundsException [ONetworkProtocolHttpDb]Error on loading resource /studio/styles/main.css
java.net.SocketException: Connection timed out
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:95)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:479)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:134)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

@kwoxer
Copy link
Author

kwoxer commented Oct 10, 2016

With 1/3 memory. Current state:

  • Checked on 04.10. - OK
  • Checked on 10.10. - OK
  • Checked on 14.10. - OK
  • Checked on 16.10. - DOWN

@kwoxer
Copy link
Author

kwoxer commented Oct 16, 2016

Ok, 12 days now. Still too less :(

So again the last lines:

...
java.net.SocketException: Socket closed [ONetworkProtocolHttpDb]Error on loading resource /studio/scripts/scripts.js
java.net.SocketException: Connection reset
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:95)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:479)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
        at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:134)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Error on loading resource /studio/components/es5-shim/es5-shim.js
java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.flush(OHttpResponse.java:550)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:483)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
        at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:137)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Error on loading resource /studio/components/json3/lib/json3.min.js
java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.flush(OHttpResponse.java:550)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:483)
        at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
        at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:137)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-10-14 21:10:14:645 WARNI ->95.221.220.97: Command not found: GET.studio/fonts/glyphicons-halflings-regular.eot [ONetworkProtocolHttpDb]
2016-10-14 21:10:15:010 WARNI ->95.221.220.97: Command not found: GET.studio/fonts/fontawesome-webfont.eot [ONetworkProtocolHttpDb]
2016-10-14 21:10:15:359 WARNI ->95.221.220.97: Command not found: GET.studio/styles/iconpicker.eot [ONetworkProtocolHttpDb]
2016-10-14 21:10:15:703 WARNI ->95.221.220.97: Command not found: GET.studio/styles/icons/tl-icons.eot [ONetworkProtocolHttpDb]
2016-10-14 21:10:17:129 WARNI ->95.221.220.97: Command not found: GET.studio/fonts/fontello.eot [ONetworkProtocolHttpDb]Killed

What can I try next? Which setting might be the real reason?

@andrii0lomakin
Copy link
Member

@kwoxer is that client log right ? Could you send server log too ?

@kwoxer
Copy link
Author

kwoxer commented Nov 6, 2016

Well this is all what I can read from the log:

java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.flush(OHttpResponse.java:550)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:483)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:444)
    at com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent.execute(OServerCommandGetStaticContent.java:137)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-10-27 00:14:39:069 WARNI ->128.68.18.135: Command not found: GET.studio/fonts/glyphicons-halflings-regular.eot [ONetworkProtocolHttpDb]
2016-10-27 00:14:39:074 WARNI ->128.68.18.135: Command not found: GET.studio/fonts/fontawesome-webfont.eot [ONetworkProtocolHttpDb]
2016-10-27 00:14:39:078 WARNI ->128.68.18.135: Command not found: GET.studio/styles/iconpicker.eot [ONetworkProtocolHttpDb]
2016-10-27 00:14:39:392 WARNI ->128.68.18.135: Command not found: GET.studio/styles/icons/tl-icons.eot [ONetworkProtocolHttpDb]
2016-10-27 00:14:39:398 WARNI ->128.68.18.135: Command not found: GET.studio/fonts/fontello.eot [ONetworkProtocolHttpDb]$ANSI{green {db=arda}} Error transforming record #-1:-1 to JSON
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.writeContent(OChunkedResponse.java:58)
    at com.orientechnologies.orient.server.network.protocol.http.OChunkedResponse.write(OChunkedResponse.java:39)
    at java.io.OutputStream.write(OutputStream.java:116)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
    at java.io.Writer.write(Writer.java:157)
    at java.io.Writer.append(Writer.java:227)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.formatMultiValue(OHttpResponse.java:408)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecordsOnStream(OHttpResponse.java:355)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.access$000(OHttpResponse.java:43)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:330)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse$2.call(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.sendStream(OHttpResponse.java:500)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeRecords(OHttpResponse.java:325)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:222)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:188)
    at com.orientechnologies.orient.server.network.protocol.http.OHttpResponse.writeResult(OHttpResponse.java:179)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandFunction.handleResult(OServerCommandFunction.java:47)
    at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandAbstractLogic.execute(OServerCommandAbstractLogic.java:81)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:168)
    at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:616)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

2016-10-27 20:54:41:283 SEVER Internal server error:
java.lang.ArrayIndexOutOfBoundsException: 8192 [ONetworkProtocolHttpDb]

@kwoxer
Copy link
Author

kwoxer commented Nov 6, 2016

This is really bad. It's hard to test at already lower values.

So lowering all is making it better, we can say!

Now I try to lower specific values, to test which have a real influence on the server runtime.

So instead of:

if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
    ORIENTDB_OPTS_MEMORY="-Xms64m -Xmx128m"
fi

if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
    JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=200g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi

# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
    ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=128 -Dmemory.chunk.size=33554432"
fi

I now take:

if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
    ORIENTDB_OPTS_MEMORY="-Xms64m -Xmx128m"
fi

if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
    JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=200g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi

# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
    ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=12 -Dmemory.chunk.size=335544"
fi

So I just changed this line
ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=12 -Dmemory.chunk.size=335544"

Let's see how long it works.

@andrii0lomakin
Copy link
Member

andrii0lomakin commented Nov 7, 2016

@maggiolo00 could you look on log output ?

@kwoxer
Copy link
Author

kwoxer commented Nov 10, 2016

Server still online. So it's already longer than usual. :)

@kwoxer
Copy link
Author

kwoxer commented Nov 13, 2016

Offline since 12.11. So from 2 days it's now 5 days. So it seems like buffersize und chunk size is something that increases the time. :) I keep on my tests.

@kwoxer
Copy link
Author

kwoxer commented Nov 13, 2016

Now:
ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=1 -Dmemory.chunk.size=335544"

@kwoxer
Copy link
Author

kwoxer commented Nov 21, 2016

Now down. So 6-7 days. Puh I no idea. This is like random I believe...

@tglman
Copy link
Member

tglman commented Nov 22, 2016

hi @kwoxer,

for monitor the memory you can run a simple cron every minute and log the process status.
ex script to log:
ps aux | grep orient | grep -v grep >>/var/log/orientdb-memory.log
ex script to get a stack dump if memory exceed 300MB
if [ `ps aux | grep orient | grep -v grep | awk '{print $6}'` -gt 307200 ]; then jstack `ps aux | grep orient | grep -v grep | awk '{print $2}'` >orientdb-stacks.txt ; fi

ex script to get a memory dump if memory exceed 300MB
if [ `ps aux | grep orient | grep -v grep | awk '{print $6}'` -gt 307200 ]; then jmap -dump:format=b,file=orientdb-memory.bin `ps aux | grep orient | grep -v grep | awk '{print $2}'` ; fi

the 307200 is the size limit in KB, test it out and as well check that the 6th column is the memory and the second is the pid in your system and in case replace the "$6" and "$2"

I hope is a linux system, otherwise no idea :)

@kwoxer
Copy link
Author

kwoxer commented Nov 24, 2016

Sure I have an Ubuntu running.

I now have:

1 * * * * if [ `ps aux | grep orient | grep -v grep | awk '{print $6}'` -gt 307200 ]; then jstack `ps aux | grep orient | grep -v grep | awk '{print $2}'` >orientdb-stacks.txt ; fi

Hopefull this helps you to help me :)

@tglman
Copy link
Member

tglman commented Nov 24, 2016

hi @kwoxer,

Be aware that for us probably a jmap is more usefull ;).

Bye

@kwoxer
Copy link
Author

kwoxer commented Nov 28, 2016

Damn. I cannot get it to work. The file isn't created with your commands.

So I tried a bit around but was not able to find the correct way of using jmap. Maybe something like:

ps aux | grep orient | grep -v grep | awk '{print $6}' | jmap | grep orient | grep -v grep

Please help me out with the correct jmap command. Cron will run it every 1 min.

@tglman
Copy link
Member

tglman commented Nov 28, 2016

hi @kwoxer,

Umm ok, if you are running it with chron double check that everything has te right permission on the file system

Regard

@kwoxer
Copy link
Author

kwoxer commented Nov 30, 2016

Nono, when I run the commands on my own, I for example get an issue with jmap. Because it needs some parameter. But when I tryjmap orientdb there is also some issue.

So what would be the command without if and then?

@kwoxer
Copy link
Author

kwoxer commented Dec 7, 2016

Mhh okay so no answer here :(

I tried to use jmap now and played a bit around. But somehow I fail to give jmap the process ID. I have:
ps aux | grep orient | grep -v grep | jmap awk {print $2}``

How can I give jmap to ID. awk {print $2} gives back the correct ID but jmap does not get it.

It's a shell question. :)

@tglman
Copy link
Member

tglman commented Dec 7, 2016

hi @kwoxer,

what do you get just with "ps aux | grep orient | grep -v grep " ?

Regards

@kwoxer
Copy link
Author

kwoxer commented Dec 8, 2016

ps aux | grep orient | grep -v grep | awk {print $2}

gives me the correct ID of the orientdb process. I think that answers your question :)

@kwoxer
Copy link
Author

kwoxer commented Dec 11, 2016

Still waiting for help =/

@tglman
Copy link
Member

tglman commented Dec 13, 2016

hi @kwoxer,

i think the problem was the loation of the file, can you try:

ow have:

1 * * * * if [ `ps aux | grep orient | grep -v grep | awk '{print $6}'` -gt 307200 ]; then jstack `ps aux | grep orient | grep -v grep | awk '{print $2}'` >/var/log/orientdb-stacks.txt ; fi

Regards

@kwoxer
Copy link
Author

kwoxer commented Dec 15, 2016

jmap is not usefull right?

Because installing jstack is ab it tricky. Here is what comes from jmap:

Attaching to process ID 8156, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.111-b14
0x0000000000400000	6K	/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
0x00007fcfaef45000	178K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libsunec.so
0x00007fcfaf371000	38K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libmanagement.so
0x00007fcfcc016000	94K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libnet.so
0x00007fcfcc22e000	75K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libnio.so
0x00007fcfe1069000	34K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libzip.so
0x00007fcfe1272000	46K	/lib/x86_64-linux-gnu/libnss_files-2.23.so
0x00007fcfe1484000	46K	/lib/x86_64-linux-gnu/libnss_nis-2.23.so
0x00007fcfe1690000	90K	/lib/x86_64-linux-gnu/libnsl-2.23.so
0x00007fcfe18a9000	34K	/lib/x86_64-linux-gnu/libnss_compat-2.23.so
0x00007fcfe1ab2000	187K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjava.so
0x00007fcfe1ce1000	66K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libverify.so
0x00007fcfe1ef2000	30K	/lib/x86_64-linux-gnu/librt-2.23.so
0x00007fcfe20fa000	87K	/lib/x86_64-linux-gnu/libgcc_s.so.1
0x00007fcfe2310000	1063K	/lib/x86_64-linux-gnu/libm-2.23.so
0x00007fcfe2619000	1529K	/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
0x00007fcfe299b000	13404K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
0x00007fcfe38d5000	135K	/lib/x86_64-linux-gnu/libpthread-2.23.so
0x00007fcfe3af2000	14K	/lib/x86_64-linux-gnu/libdl-2.23.so
0x00007fcfe3cf6000	102K	/lib/x86_64-linux-gnu/libz.so.1.2.8
0x00007fcfe3f10000	1821K	/lib/x86_64-linux-gnu/libc-2.23.so
0x00007fcfe42d9000	58K	/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
0x00007fcfe44e8000	158K	/lib/x86_64-linux-gnu/ld-2.23.so

Is this usefull?

@kwoxer
Copy link
Author

kwoxer commented Dec 15, 2016

Ahh ok jstack is now working.

So this is when orientdb is running:
2016-12-15 11:44:19
Full thread dump OpenJDK 64-Bit Server VM (25.111-b14 mixed mode):

"Attach Listener" #17 daemon prio=9 os_prio=0 tid=0x00007fcfb8001000 nid=0x2193 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" #16 prio=5 os_prio=0 tid=0x00007fcfdc00d000 nid=0x1fe1 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"OrientDB ONetworkProtocolHttpDb listen at 0.0.0.0:2480-2490" #14 prio=5 os_prio=0 tid=0x00007fcfdc886000 nid=0x1fec runnable [0x00007fcfaee42000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at com.orientechnologies.orient.server.network.OServerNetworkListener.run(OServerNetworkListener.java:187)

"OrientDB ONetworkProtocolBinary listen at 0.0.0.0:2424-2430" #12 prio=5 os_prio=0 tid=0x00007fcfdc872000 nid=0x1feb runnable [0x00007fcfaef43000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at com.orientechnologies.orient.server.network.OServerNetworkListener.run(OServerNetworkListener.java:187)

"Timer-0" #9 daemon prio=5 os_prio=0 tid=0x00007fcfdc65b000 nid=0x1fea in Object.wait() [0x00007fcfafa7a000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000fae58ff8> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x00000000fae58ff8> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)

"Service Thread" #7 daemon prio=9 os_prio=0 tid=0x00007fcfdc0ac000 nid=0x1fe8 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C1 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007fcfdc0a9000 nid=0x1fe7 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007fcfdc0a7000 nid=0x1fe6 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007fcfdc0a4800 nid=0x1fe5 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007fcfdc07d000 nid=0x1fe4 in Object.wait() [0x00007fcfccffe000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000fac69dc8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x00000000fac69dc8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007fcfdc078800 nid=0x1fe3 in Object.wait() [0x00007fcfe0107000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000fac69f80> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0x00000000fac69f80> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

"VM Thread" os_prio=0 tid=0x00007fcfdc071000 nid=0x1fe2 runnable

"VM Periodic Task Thread" os_prio=0 tid=0x00007fcfdc0cb800 nid=0x1fe9 waiting on condition

JNI global references: 1606

@kwoxer
Copy link
Author

kwoxer commented Dec 20, 2016

1 * * * * if [ ps aux | grep orient | grep -v grep | awk '{print $6}' -gt 307200 ]; then jstack ps aux | grep orient | grep -v grep | awk '{print $2}' >/var/log/orientdb-stacks.txt ; fi

is the crontab script. But somehow it did not write. Why is the cron not writing to this file? Is the issue with crontab or with the script?

@kwoxer
Copy link
Author

kwoxer commented Jan 3, 2017

Please help me guys =/ Could you maybe setup a Amazon Web Service with 512 MB RAM and test it with me? Thank you.

@andrii0lomakin
Copy link
Member

@kwoxer It may be related to the fact that ODB consumes more memory than we expect I will keep you posted when we solve given issue. I suppose it will take week or two.

@kwoxer
Copy link
Author

kwoxer commented Jan 5, 2017

Yes it's still the memory as single issue. Great. Hopefully you can help me then. Thank you

@kwoxer
Copy link
Author

kwoxer commented Feb 5, 2017

And how is it going, 1 month later? :)

@kwoxer
Copy link
Author

kwoxer commented Mar 22, 2017

Something new?

I just updated the server to latest software. And now started server again. Maybe now it works a bit longer...

@tglman tglman added this to the 2.2.x (next hotfix) milestone Mar 27, 2017
@parimal-padture
Copy link

👍

@tglman
Copy link
Member

tglman commented Jun 5, 2017

hi @kwoxer, @parimal-padture,

Some issue on the http layer have been fixed in 2.2.20, I think also this issue has been solved, you can download last hotfix 2.2.21 regards

@kwoxer
Copy link
Author

kwoxer commented Jun 20, 2017

Still not working with the latest release.

But I was able to use a workaround now. I'm doing it with https://stackoverflow.com/questions/696839/how-do-i-write-a-bash-script-to-restart-a-process-if-it-dies

So

until sh server.sh; do
echo "Server 'orientdb' crashed with exit code $?. Respawning.." >&2
sleep 1
done

is working perfectly for me.

So shall this here be closed? I mean it's still an issue but with automatically restarting the server all is fine for me and it's like a proper solution.

@andrii0lomakin andrii0lomakin removed their assignment Sep 25, 2017
@tglman
Copy link
Member

tglman commented Apr 17, 2018

Hi @kwoxer,

This is a while ago, I would suggest to update to a more recent hotfix, we do not have anyone reporting problem like this in recent hotfixes.

Closing how you mentioned.
Regards

@FerhatBahceci
Copy link

Hey guys, I had the same issue.

Realized that I did not pass this into the JVM:

System.setProperty("javax.net.ssl.keyStore", "src/main/resources/certificates/YOUR_CERT)
System.setProperty("javax.net.ssl.keyStorePassword", PW_TO_YOUR_CERT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

9 participants