-
-
Notifications
You must be signed in to change notification settings - Fork 237
Cant upload images in production #1019
Comments
I'm having the same problem, would love any advice! |
I did not determine the source of the problem, but it seems it was related to the configuration of the mongo server. I use nodechef, and was encountering this issue while using mlab databases with default configuration. The moment I pointed my installation to the default nodechef databases instead image upload worked with no additional configuration required at all. |
Same here using heroku and the mlab add-on. Will try a different configuration. |
What fixed the problem for me was I ran "db.cfs.images.filerecord.ensureIndex({ files_id : 1, n : 1 })" for all my collections related uploading images |
This didn't work for me. Then I have deleted the db, set up a new mLab. But the images still won't upload. This seems to be in line with @conciousweb. |
I actually attempted the suggestion @jenniewerner mentioned first as well, and it did not fix the issue for me either. @jenniewerner are you hosting your databases also with mLab? |
I think it may be time for me to give a go at ostrio:files, and S3 integration for persistent files. |
+1, how to solve? |
The problem disappeared on its own when I left mlab and hosted my database on nodechef where my instance was also located. Cant say for certain what the actual issue was |
thanks, for your reply. |
Image upload works fine in local/dev environment but compiled/in production i receive this error when I try to upload an image:
/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/lib/mongodb/connection/base.js:246
throw message;
^
Error: Error storing uploaded file to TempStore: Can't get executor for query
{
"files_id": "5a07798f6ce25b0800871962",
"n": {
"$gte": 0
}
}
at EventEmitter. (packages/cfs_collection.js:186:28)
at emitTwo (events.js:92:20)
at EventEmitter.emit (events.js:172:7)
at Stream. (packages/cfs_tempstore.js:364:10)
at emitOne (events.js:82:20)
at Stream.emit (events.js:169:7)
at Stream._error (/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/gridfs-stream/lib/writestream.js:190:8)
at /bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/gridfs-stream/lib/writestream.js:128:28
at /bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js:524:58
at /bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js:474:20
2017-11-11 22:28:33 App1_openinvite SA GridFS - ERROR! { [MongoError: Can't get executor for query { files_id: ObjectId('5a07798f6ce25b0800871962'), n: { $gte: 0 } }]
name: 'MongoError',
ok: 0,
errmsg: 'Can't get executor for query { files_id: ObjectId('5a07798f6ce25b0800871962'), n: { $gte: 0 } }',
code: 17241,
codeName: 'Location17241' }
The text was updated successfully, but these errors were encountered: