https://supertokens.com/ logo
Title
d

d3adb0y

02/02/2023, 7:35 AM
i am intermittently receiving
supertokens_python.exceptions.GeneralError: No SuperTokens core available to query
and im not sure why
r

rp

02/02/2023, 7:36 AM
hey @d3adb0y
are you connecting to the dev instance?
d

d3adb0y

02/02/2023, 7:37 AM
uhhh
what you mean?
r

rp

02/02/2023, 7:37 AM
you are using our managed service right?
d

d3adb0y

02/02/2023, 7:37 AM
no no, self hosted
on azure
r

rp

02/02/2023, 7:37 AM
then check if your core is running.. visit the /hello API of the core url and see if that works
d

d3adb0y

02/02/2023, 7:39 AM
hm
do you think running the in memory database
is causing issues?
r

rp

02/02/2023, 7:40 AM
probably not. You should not use the in memory db for production use though.
check your core setup please.
since this is self hosted, there isn't much help we can give here anyway
d

d3adb0y

02/02/2023, 7:41 AM
oh i know just thought maybe i was doing something incredibly dumb
r

rp

02/02/2023, 7:41 AM
well.. maybe just some azure issue.. try restarting the core
d

d3adb0y

02/02/2023, 7:41 AM
let me check th elogs
logs*
i threw it up on Azure App Service to get me going intially
but i just finished getting my k8s deployments in place so i will probably migrate it over there
r

rp

02/02/2023, 7:43 AM
right
d

d3adb0y

02/02/2023, 7:43 AM
i just dont have enough time before tomorrow to do so
ugh
r

rp

02/02/2023, 7:43 AM
well..
d

d3adb0y

02/02/2023, 7:43 AM
it doesnt seem to be persistent anyways
r

rp

02/02/2023, 7:44 AM
you should not use the in mem db
d

d3adb0y

02/02/2023, 7:44 AM
yeah i will see if changing that stablizes it
thanks for your help as always man 🙂
you never sleep huh
lmao
also
switching to proper postgres db did not help the situation
seems like its still throwing those errors.
r

rp

02/02/2023, 8:02 AM
really not sure whats going wrong. See the error logs maybe
i don;t have any info + you are self hosting it
so you are kind of on your own here.. sorry
d

d3adb0y

02/02/2023, 8:02 AM
theres no logs in the supertokens container?
r

rp

02/02/2023, 8:02 AM
there should be
d

d3adb0y

02/02/2023, 8:02 AM
is that expected
r

rp

02/02/2023, 8:02 AM
it's not expected
are you using a file to log stuff to? WHat configs have you provided to the docker image?
d

d3adb0y

02/02/2023, 8:03 AM
oh must be an azure app service thing smh
r

rp

02/02/2023, 8:06 AM
yea
d

d3adb0y

02/02/2023, 8:51 AM
enabled logs on my instance
not seeing any exceptions thrown
oh wait am finally seeing something....
Driver org.postgresql.Driver claims to not accept jdbcUrl
r

rp

02/02/2023, 9:16 AM
when you visit the hello API, what do you see?
d

d3adb0y

02/02/2023, 9:17 AM
it shows the expected response immediately
r

rp

02/02/2023, 9:17 AM
right. So you see "hello" on the browser screen?
d

d3adb0y

02/02/2023, 9:18 AM
yup
r

rp

02/02/2023, 9:18 AM
ok so the core is working fine
now if your backend server can't connect to the core, check that the connection uri you have passed to the backend sdk init is correct - what value have you passed?
d

d3adb0y

02/02/2023, 9:19 AM
its correct. otherwise why would it work half the time?
it just spontaneously stops working
for no apparent reason
the call to my api /users/me/ endpoint just hangs until supertoken throws in my app.
init(
        app_info=InputAppInfo(
            app_name=app_name,
            api_domain=api_domain,
            website_domain=website_domain,
            api_base_path=api_base_path,
            website_base_path=website_base_path
        ),
        supertokens_config=SupertokensConfig(
            connection_uri=connection_uri,
            api_key=api_key
        ),
        framework='fastapi',
        recipe_list=[
            userroles.init(),
            session.init(), # initializes session features
            passwordless.init(
                flow_type="USER_INPUT_CODE_AND_MAGIC_LINK",
                contact_config=ContactEmailOnlyConfig(),
                override=passwordless.InputOverrideConfig(
                    apis=api_overrides
                ),
            ),
            dashboard.init(api_key=api_key)
        ],
        mode='asgi' # use wsgi if you are running using gunicorn
    )
only non standard thing im doing is providing overrides for extra validations that the email exists in another system
oh
wtf
no tables are created in my database
im just gonna switch to hosted for now lmao