Skip to content

Commit

Permalink
Improve queue limit error to show config message
Browse files Browse the repository at this point in the history
  • Loading branch information
Benito Palacios Sanchez committed Sep 29, 2016
1 parent 299b34e commit dc05526
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
13 changes: 8 additions & 5 deletions Messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This document contains a detailed description of the messages from the Log Parse
- [LP-16: Cannot initialize Monitoring: string too long in the RS configuration](#lp-16-cannot-initialize-monitoring-string-too-long-in-the-rs-configuration)
- [LP-17: Cannot deserialize sample](#lp-17-cannot-deserialize-sample)
- [LP-18: Cannot match remote entity in topic 'X': Different type names found ('Y', 'Z')](#lp-18-cannot-match-remote-entity-in-topic-x-different-type-names-found-y-z-)
- [LP-19: Sample dropped because ShareMemory queue (num=X, size=Y) is full](#lp-19-sample-dropped-because-sharememory-queue-num-x-size-y-is-full)
- [LP-19: Sample dropped because ShareMemory queue X is full](#lp-19-sample-dropped-because-sharememory-queue-x-is-full)

## Warnings

Expand Down Expand Up @@ -124,7 +124,10 @@ More information is available in the following Knowled-Base solution:
### LP-18: Cannot match remote entity in topic 'X': Different type names found ('Y', 'Z')
It happens when a remote entity cannot be matched because of a type mismatch. The TypeObject information is not available for one or both entities so the type name fields are checked. In this case, the name of the types are different and as a consequence, the match is not possible. To fix the issue, please ensure that Y is equals to Z.

### LP-19: Sample dropped because ShareMemory queue (num=X, size=Y) is full
This error happens when a received is dropped because there isn't enough space in the ShareMemory queue. The queue is limited by a maximum number of messages (`X` value) and a maximum size in bytes (`Y` value). You can configure these limits by changing the following properties:
* Number of messages: dds.transport.shmem.builtin.received_message_count_max (default 64)
* Size: dds.transport.shmem.builtin.receive_buffer_size (default 1048576 (1 MB))
### LP-19: Sample dropped because ShareMemory queue X is full
This error happens when a received is dropped because there isn't enough space in the ShareMemory queue. The queue is limited by a maximum number of messages and a maximum size in bytes. You can find the limits for the ShareMemory queue in port `X` in the configuration message:
> ShareMemory limits for queue X (X) are: max_num=Y, max_size=Z
You can configure these limits by changing the following properties:
* Maximum number of messages (`Y` value): dds.transport.shmem.builtin.received_message_count_max (default 64)
* Maximum size (`Z` value): dds.transport.shmem.builtin.receive_buffer_size (default 1048576 (1 MB))
10 changes: 8 additions & 2 deletions src/network/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.
from __future__ import absolute_import
from logger import log_recv, log_send, log_process, log_warning, log_error
from logger import log_cfg
from utils import parse_guid, hex2ip, parse_sn, get_oid, get_participant
from utils import get_port_name, get_locator, is_builtin_entity
from utils import get_port_number
Expand Down Expand Up @@ -349,8 +350,13 @@ def on_deserialize_failure(match, state):

def on_shmem_queue_full(match, state):
"""It happens when the ShareMemory queue is full and data is dropped."""
port = get_port_number(match[0], state)
port_name = get_port_name(int(match[0], 16))
count_max = match[1]
max_size = match[2]
log_error("[LP-19] Sample dropped because ShareMemory queue " +
"(num=%s, size=%s) is full." % (count_max, max_size),
log_cfg("ShareMemory limits for queue %s (%s) are: max_num=%s, max_size=%s"
% (port, port_name, count_max, max_size),
state)
log_error("[LP-19] Sample dropped because ShareMemory queue %s is full."
% port,
state)

0 comments on commit dc05526

Please sign in to comment.