I'm seeing strange behavior with the heroku run command where large output jobs will randomly not return all the data they should.
The concrete use case that surfaced this was using the replicate gem to pull down a lot of relational data for a user.
I recreated it consistently with a basic rails app with a ~3.5MB copy of Shakespeare plays as a text file.
At first I thought it was just truncating the output after it reached a specific byte count but as you can see from the output below, it's seemingly random.
Here's an example of what I'm seeing:
Locally
╰─○ nl shakespeare_plays.txt| tail
88121 <A NAME=5.4.213>would kiss as many of you as had beards that pleased</A><br>
88122 <A NAME=5.4.214>me, complexions that liked me and breaths that I</A><br>
88123 <A NAME=5.4.215>defied not: and, I am sure, as many as have good</A><br>
88124 <A NAME=5.4.216>beards or good faces or sweet breaths will, for my</A><br>
88125 <A NAME=5.4.217>kind offer, when I make curtsy, bid me farewell.</A><br>
88126 <p><i>Exeunt</i></p>
88127 </body>
88128 </html>
Via Heroku
$ heroku --version
heroku-toolbelt/2.33.5 (x86_64-darwin10.8.0) ruby/1.9.3
$ heroku run 'cat shakespeare_plays.txt' | nl | tail
75588 ROMEO But that a joy past joy calls out on me,
75589 It were a grief, so brief to part with thee: Farewell.
75590 [Exeunt]
75591 ROMEO AND JUL%
$ heroku run 'cat shakespeare_plays.txt' | nl | tail
37554 <A NAME=4.4.27>With what it loathes for that which is away.</A><br>
37555 <A NAME=4.4.28>But more of this hereafter. You, Diana,</A><br>
37556 <A NAME=4.4.29>Under my poor instructions yet must suffer</A><br>
37557 <A NAME=4.4.30>Something in my behalf.</A><br>
37558 </blockquote>
37559 <A NAME=speech4><b>DIANA</b></a>
37560 <blockquote>
37561 <A NAME=4.4.31>Let death and honesty</A><br>
37562 <A NAME=4.4.32>Go with your impositions, I am yours%
$ heroku run 'cat shakespeare_plays.txt' | nl | tail
14070 <A NAME=5.2.56>yourself good and not to grace me. Believe then, if</A><br>
14071 <A NAME=5.2.57>you please, that I can do strange things: I have,</A><br>
14072 <A NAME=5.2.58>since I was three year old, conversed with a</A><br>
14073 <A NAME=5.2.59>magician, most profound in his art and yet not</A><br>
14074 <A NAME=5.2.60>damnable. If you do love Rosalind so near the heart</A><br>
14075 <A NAME=5.2.61>as your gesture cries it out, when your brother</A><br>
14076 <A NAME=5.2.62>marries Aliena, shall you marry her: I know into</A><br>
14077 <A NAME=5.2.63>what straits of fortune she is driven; and it is</A><br>
14078 <A NAME=5.2.64>not impossible to me, if it appear not inconvenient</A><br>
14079 <A NAME=5.2.65>to you, to set her before your eyes tomorrow human%
I'm seeing strange behavior with the
heroku runcommand where large output jobs will randomly not return all the data they should.The concrete use case that surfaced this was using the replicate gem to pull down a lot of relational data for a user.
I recreated it consistently with a basic rails app with a ~3.5MB copy of Shakespeare plays as a text file.
At first I thought it was just truncating the output after it reached a specific byte count but as you can see from the output below, it's seemingly random.
Here's an example of what I'm seeing:
Locally
Via Heroku