title: Orion Context Broker stops responding after some hours
body: <p>This error occurred with v. 0.11.0 of the Orion Context Broker.</p>
  
  <p>I've been running an instance of the Orion Context Broker in the FIWARE Testbed, and after some hours, the Orion Context Broker simply stops responding. However, it does not crash, that is, when querying the status of the context broker with the command:</p>
  
  <pre><code>/etc/init.d/contextBroker status
  </code></pre>
  
  <p>it will respond with "Running". </p>
  
  <p>However, it does not respond to any http requests issued towards it. For example, the sanity check run directly on the VM with the context broker will fail:</p>
  
  <pre><code>wget http://localhost:1026/version
  </code></pre>
  
  <p>Stopping and starting orion or restarting orion, does not resolve the issue. Restarting the linux VM itself, resolves the issue, until it stops working again with the same issue.</p>
  
  <p>I'm running with a constant activity of about 40 entities with a total of about 100 different attributes. I have on average ~100 attributes that are updated every 5 second and this is encapsulated in about 1-40 requests, send at the same time towards the updateContext operation of the Orion Context Broker.</p>
  
  <p>I currently have a single subscriber that subscribes to the ONCHANGE event on ALL attributes for ALL entities (using a regular expression).</p>
  
  <p>I am still able to connect to the VM through SSH, however, it feels less responsive after a while, which leads me to believe it is probably some sort of a memory leak.</p>
  
  <p>Also, as time passes when running updateContext requests towards the broker, these start to feel less and less responsive. (That is, just after restarting the broker, all operations always finish very quickly, however, after a while, it takes a bit longer for them to finish).</p>
  
  <p>I will be able to provide extra information if requested.</p>
  
  <p><strong>EDIT: Detailed usage statistics</strong></p>
  
  <p>We run ~20 updateContext requests towards the context broker every 5 seconds. These requests are sent in parallel. Each request has 1 context element with 5-20 attributes (rough estimate!). The contextValue is each of these is a complex value that looks like:</p>
  
  <pre><code>&lt;Measurement&gt;
    &lt;Value&gt;20.53&lt;/Value&gt;
    &lt;Timestamp&gt;2014-05-08T18:03:00Z&lt;/Timestamp&gt;
  &lt;/Measurement&gt;
  </code></pre>
  
  <p>We run a single subscriber that initially subscribes against the context broker for 10 minutes on ALL entities and all attributes using a regular expression. We update the subscription every 5 minutes to maintain it while the application is alive. (using the update subscription operation).</p>
  
  <p>We do not use any synchronous operations to query context data at all.</p>
  
  <p>We run the context broker on the FIWARE Testbed with HW configuration:</p>
  
  <pre><code>RAM:  4096MB
  VCPUs:  2 VCPU
  Disk:  10GB
  </code></pre>
  
  <p>And it is running on CentOS release 6.3 (Final)</p>