<h3>Description</h3>
<p>We need to connect to a cluster of mongodb hosts with some specific parameters.<br>
The connection string has length more than 255 characters.<br>
We could not connect to our mongodb.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Use very long string for example like bellow</p>
<p>mongo0-pdb-demo.somedomain.com:27017,mongo1-pdb-demo.somedomain.com:27017,mongo2-pdb-demo.somedomain.com:27017/proxy-db-ft1?replicaSet=rs0&ssl=true&sslClientCertificateKeyFile=/etc/ssl/domain1234.pem&sslCertificateAuthorityFile=/etc/ssl/godaddy.pem</p>
<h4>Log Messages</h4>
<p>We got errors:</p>
<p>ERROR:  [db.c:168]: db_bind_mod(): SQL URL too long<br>
ERROR: auth_db [auth_db_mod.c:173]: mod_init(): unable to bind to a database driver</p>
<h3>Additional Information</h3>
<p>version: kamailio 4.4.7 (x86_64/linux)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1545">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZSi77iKfcnNZ3_a58tak84sJj62uks5t2Cl4gaJpZM4UONkq">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZdJYwXU_Za0LFMSf2FjEx_DXVtI2ks5t2Cl4gaJpZM4UONkq.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/kamailio/kamailio/issues/1545","url":"https://github.com/kamailio/kamailio/issues/1545","name":"View Issue"},"description":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"srdb1: connection string to mongodb too long (#1545)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1545"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647",
"title": "srdb1: connection string to mongodb too long (#1545)",
"sections": [
{
"text": "",
"activityTitle": "**Konstantin**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@tiglat",
"facts": [
{
"name": "Repository: ",
"value": "kamailio/kamailio"
},
{
"name": "Issue #: ",
"value": 1545
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1545,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1545\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1545"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 339269930\n}"
}
],
"themeColor": "26292E"
}</script>