After running this line of code
db.runCommand({convertToCapped: "mail_logs", size: 29250000 })
in Mongo Shell, I get this error:
Error: Line 1: Unexpected token ILLEGAL
After running this line of code
db.runCommand({convertToCapped: "mail_logs", size: 29250000 })
in Mongo Shell, I get this error:
Error: Line 1: Unexpected token ILLEGAL
I bumped into the same issue, the problem was caused by the double quotes breaking the JSON command issued.
If you haven't solved by now, try
db.runCommand({convertToCapped:'mail_logs', size: 29250000});