Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoRuby::SimpleFeatures::EWKBFormatError errors #55

Open
Aryk opened this issue Jan 16, 2021 · 1 comment
Open

GeoRuby::SimpleFeatures::EWKBFormatError errors #55

Aryk opened this issue Jan 16, 2021 · 1 comment

Comments

@Aryk
Copy link

Aryk commented Jan 16, 2021

When my model refreshes, I'm getting this error sometimes:

Screen Shot 2021-01-16 at 8 12 33 PM

      def read_point
        i = @position
        @position += 16
        fail EWKBFormatError.new('Truncated data') if @ewkb.length < @position
        @ewkb.unpack("@#{i}#{@double_mark}#{@double_mark}@*")
      end

I'm getting this in my production and I also get it in my test cases intermittently. My testcases are threaded which is why I thought they were happening.

But... they are also happening on production which is not using threading and it is just normal Rails / Puma. It seems like there is some kind of race condition being hit when the database records are being refresh.

I'm using Sequel orm which might be the source, but I don't think that is causing it.

Can someone give me some insight why this might be happening intermittently?

@Aryk
Copy link
Author

Aryk commented Jun 3, 2021

Nevermind, the other library I was using wasn't threadsafe:

bsears/sequel-postgis-georuby#1

This PR will fix it for those that use Sequel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant