It seems like this command wont work:
cmonary.monary_query_count(m._connection, "db", "collection", None)
Segmentation fault [Exit 139 (SIGSEGV)]
The collection has something like 150k records * 45 fields each. Server has 4gb ram (so all the data should fit in ram).
Even if I substitute monary's count with pymongo count the same problem will occur when cmonary initializes the query.