Open mjy opened 3 years ago
We have discovered that if we exercise our Factory early in the test process, then we can at least run tests using spring
, though we can various get raises after they complete:
#/config/initializers/gis.rb
module Gis
SPHEROID = 'SPHEROID["WGS-84", 6378137, 298.257223563]'.freeze
FACTORY = RGeo::Geographic.projected_factory(srid: 4326,
projection_srid: 4326,
projection_proj4: "EPSG:4326",
uses_lenient_assertions: true,
has_z_coordinate: true,
wkb_parser: {support_ewkb: true},
wkb_generator: {hex_format: true, emit_ewkb_srid: true})
# Warm up RGeo/Proj before any forking may occur (solves some problems with spring on Mac)
FACTORY.parse_wkt('POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))')
end
Perhaps final followup.
Following this:
Then:
And when Factory is warmed up as above,
only then spring
calls pass without a (fork?) issue. [Edit, not all all are removed]
Thanks for the detailed write-up. I don't know how much I'll be able to help as more info comes out about the root cause since I don't have access to a system with an M1 chip.
If there's anything I can do or if you want to ask questions/discuss something about how the library is set up that might be causing it I'd be happy to help.
Thanks for the offer. Thought we had things resolved but we're still getting raise errors on rails 6.1 in some scenarios. If we can leave this open for a bit I'll add further insights if/when we track them down. There is an outside chance it's related to table truncation/forking, but not worth sending people off on wild goose chases till we can nail things down further.
Spamming keywords to others might find this. I realize this this is
spring
centric, but there is high potential for some pg element to it, see below. This issue is, maybe, alluded to in various other tickets in various other places, none of which seem to come up with a concrete answer, crossreferencing:When we run
spring
then we get faults on both M1 and Intel under Big Sur.proj_create_operations: SQLite error on SELECT allowed_authorities FROM authority_to_authority_preference WHERE source_auth_name = ? AND target_auth_name = ?: disk I/O error
1
2