Question: I am seeing a lot of exceptions in my log:

```
A Mongo::OperationFailure occurred in foo#bar:

Mongo::OperationFailure
mongo (1.6.2) lib/mongo/util/tcp_socket.rb:76:in `read'

```

I am using Mongoid as my Ruby driver. 

Not sure if this is related to connection pooling, but just in the event it is, this is my mongoid.yml:

```
production:
  host: xxx
  port: 27017
  username: xxx
  password: xxx
  database: foo
  logger: false
  pool_size: 200
  max_retries_on_connection_failure: 5

```

I understand EC2 can have transient network issues, but this is almost becoming the norm. What's the best way to solve this problem?

Just for background information, I'm running JRuby 1.6.7.

Answer: 
Follow this link also: <http://www.softhinker.com/in-the-news/iosmdmvendorcsrsigning>

and remove the passphrase from customerPrivateKey.pem 
using this command

```
openssl rsa -in customerPrivateKey.pem -out PlainKey.pem

```

Then merge your APNS certificate (for example CustomerCompanyName.pem) downloaded from the portal <https://identity.apple.com/pushcert/> using this command

```
cat CustomerCompanyName.pem PlainKey.pem > PlainCert.pem

```

Now this PlainCert.pem file can be used in your server code.
here's a document that should help 

<https://media.blackhat.com/bh-us-11/Schuetz/BH_US_11_Schuetz_InsideAppleMDM_WP.pdf>

The APNS cert downloaded from apple should contain the public key portion of your certificate.
you'll need to combine it with the private key to make a complete .p12 pem file.
this should be the PlainCert.pem that the code is talking about.