Basic_Troubleshooting(3) None

TROUBLESHOOTING CHECKLIST

The following is a short list of things to check when you have a problem.

\[bu]
Did you call mongoc_init(3) in main(3) ? If not, you will likely see a segfault.
\[bu]
Have you leaked any clients or cursors as can be found with ?
\[bu]
Have packets been delivered to the server? See egress bytes from \&.
\[bu]
Does valgrind show any leaks? Ensure you call mongoc_cleanup(3) at the end of your process to cleanup lingering allocations from the MongoDB C driver.
\[bu]
If compiling your own copy of MongoDB C driver, consider configuring with --enable-tracing to enable function tracing and hex dumps of network packets to STDERR and STDOUT \&.

PERFORMANCE COUNTERS

The MongoDB C driver comes with a unique feature to help developers and sysadmins troubleshoot problems in production.
        Performance counters are available for each process using the driver.
        The counters can be accessed outside of the application process via a shared memory segment.
        This means that you can graph statistics about your application process easily from tools like Munin or Nagios.
        Your author often uses watch --interval=0.5 -d mongoc-stat $PID to monitor an application.

NOTE

Counters are currently available on UNIX-like platforms that support shared memory segments.

\[bu]
Active and Disposed Cursors
\[bu]
Active and Disposed Clients, Client Pools, and Socket Streams.
\[bu]
Number of operations sent and received, by type.
\[bu]
Bytes transferred and received.
\[bu]
Authentication successes and failures.
\[bu]
Number of wire protocol errors.

To access counters for a given process, simply provide the process id to the mongoc-stat program installed with the MongoDB C Driver.

$

SUBMITTING A BUG REPORT

Think you’ve found a bug? Want to see a new feature in the MongoDB C driver? Please open a case in our issue management tool, JIRA:

\[bu]
Create an account and login \&.
\[bu]
Navigate to the CDRIVER project \&.
\[bu]
Click Create Issue - Please provide as much information as possible about the issue type and how to reproduce it.

Bug reports in JIRA for all driver projects (i.e. CDRIVER, CSHARP, JAVA) and the Core Server (i.e. SERVER) project are public \&.

COLOPHON

This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.