Would it be possible to use the existing database on a new gigalixir project and what would the costs be?

We are actually providing you with a database instance, not a database. A database instance can house multiple databases. The connection string for your instance will look something like this postgresql://gigalixir_admin:PASSWORD@11.22.33.44:5432/DATABASENAME

The gigalixir_admin account is an admin on the instance and you can create a new database with standard Postgres syntax (eg. CREATE DATABASE …). Just make sure you understand that you are sharing CPU/memory/bandwidth/connection count between all clients (apps). Also consider that the database will probably get a little restrictive as your apps grow.



How can I, with clustering, make the request go to any of my app servers and then have it redirect the request to the right server?

Libcluster is our preferred method for clustering your replicas together. Then use :global when starting the game server.



What changes should I make to resolve the spike in too_many_connections errors?

There are two options:
Option 1:

  • Scale down your application (releasing some connections)
  • Connect over psql and look at the active connections and terminate some connections
  • Start your application back up
    Option 2:

We can run a database restart for you. This will take about 20 minutes to complete.



How can I resolve this issue when setting JSON config file as environment variable?

Please escape the double quotes in your setup, here are two ways to do that:

gigalixir config:set JSON_VARIABLE=’{“key”: “value”}’

Additionally, if your JSON gets really complex, a lot of people will base64 encode the JSON, store that in the config, then on retrieval decode the base64 before decoding the JSON.

gigalixir config:set JSON_VARIABLE=”{"key": "value"}”



Is it possible to redirect a www. subdomain to a non-www. version on your end?

Unfortunately there is not an easy way for us to do this in the load balancer. However I think you can make use of this hex package



How do we upgrade our Postgres instance?

We can start the upgrade in our backend. Let us know the instance you intend to upgrade to. Note the process will involve downtime, so please advise the date/time that works best for you. The upgrade usually takes 10-30 minutes depending on the database size.



Is it possible to install PostGIS in Gigalixir DB?

For our standard tier databases, you should be able to install it with psql using the CREATE EXTENSION command.

You can read more on this here: https://cloud.google.com/sql/docs/postgres/extensions. In the free tier databases, we do not offer extensions.



To resolve this error, please use the entire private key, even the parts:

—begin private key–

and

–end private key–



How do we ensure that users on a shared credential whose SSH keys have been revoked can no longer connect to Gigalixir?

The SSH keys get synchronized every minute. Any existing connections are not affected, meaning they will remain open, as they have already passed the authorization step.

The best way to “kick off” any users would be to:

  1. remove the SSH key in our system,
  2. restart or redeploy your application.

Restarting the application closes any existing SSH connections.



Do you have any monitoring/alert systems in place for events such as VM restarts due to “OOMKilled”, so we can proactively investigate the issue?

Please provide us with a slack incoming webhook address. We can set our system up to send you a message for OOMKilled events.



Is there a way to download a backup database

Downloading backup databases is not an available option and is a Google Cloud SQL limitation. We can however restore the database to a new instance by creating a new app (with no replicas at zero cost) and a new database instance in said app (at a prorated cost, to the second). You can then login, grab the data and terminate the instance immediately afterwards to avoid paying the full cost.



How can I add a new team member to the CLI?

To add a new team member to the CLI, please make sure the new team member is an existing user by having them signup for an account with “gigalixir signup”, and then add them to the CLI.



How can I change my subscription to a paid plan?

To change your subscription to a paid plan, you can do it via the CLI following these directions:

https://www.gigalixir.com/docs/account



How can I run seeds file to populate the db from a couple of large CSV files sitting in Gigalixir at data?

You can try logging in via ssh and running at the shell.

You can find your SECRET_KEY_BASE in the /kube-env-vars/SECRET_KEY_BASE file.

You can export it with this:

export SECRET_KEY_BASE=$(cat /kube-env-vars/SECRET_KEY_BASE)

You may also need export DATABASE_URL, which you can pull from gigalixir config and APP_NAME to get things working properly.

Note: for larger files, you may need to run the migration from your local system. Set the DATABASE_URL and run the migration locally. Something like this:

MIX_ENV=prod DATABASE_URL=ecto://… mix ecto.migrate FILE1 FILE2

If you want to avoid any prod specifics and only care about the database connection, you can probably just drop the MIX_ENV=prod. Either way, just be sure you pull the DATABASE_URL from the environment variable in your config.

You can get your database url from “gigalixir pg.”



It appears Gigalixir rejects non-ASCII domains

We now support non-ASCII domains too!



It’s mentioned that we’ll need to bring our own SSL cert for a wildcard domain (e.g. *.freshline.io), is this something that can be provisioned automatically via something like Let’s Encrypt? Or would we need to purchase a certificate with a long-expiry from a CA and manually swap it out before expiry?

We have setup DNS verification for wildcard domains using Lets Encrypt in the past, but it would require that we have access to your DNS system’s API.



During the early stages of this product we expect to have customer numbers in the tens to low hundreds—we’re happy to use the CLI to provision custom domains to start, but is there an API to automate the process of adding a custom domain/certificate?

We have an API for adding custom domains, which will automatically setup a Let’s Encrypt certificate utilizing the HTTP verification method.

This method covers the vast majority of our customers. We have very few customers that utilize their own certificates or wildcard certs.



What is the domain validation process like (this is a process we will have to pass on to our customers) Do you support Let’s Encrypt-style HTTP validation for subdomains?

If you bring your own certificate (wildcard or not), we would have to manually upgrade the certificate for you. If this is something you plan to do regularly, then we will work on automating that process. It is just such a low occurence for us at the moment that we can easily handle the requests manually.



Is it possible to transfer ownership of apps to a different account without disrupting service?

Yes. Here are the steps to get the apps transferred

  1. Have the new email address signup
  2. Have the new email address upgrade to the STANDARD tier
  3. You add the new email address as a collaborator to the applications you want transferred
  4. Have the new email address email us here to confirm to which apps they are willing to take
  5. We will bill the current account up to the point the new account signed up and transfer the apps over.


Do you have any experiences in integrating datadog?

We suggest you use spandex with spendex_datadog and then any other addons you might need.



My bill was constant for quite a while, but bumped up to a higher rate at a certain point. I suspect I’ve inadvertently changed instances / size and would love to know what changed to fix it. Is there a way to get a more detailed invoice for my account?

You can check your current running usage on the command line with: gigalixir account:usage:running



How can I forward a subdirectory of my Gigalixir application domain to a different application completely outside of Gigalixir without using a subdomain to serve the content?

Gigalixir is not appropriately setup as a reverse proxy for assets outside of our infrastructure. QuotaGuard (www.quotaguard.com), our partner company, is a proxy company that can provide users with an inbound proxy or also known as a reverse proxy.

The QuotaGuard Static ​service’s (not Shield) Micro Plan or higher allows for inbound proxy. While it will not have an option for the path based routing in the IU, we can definitely help users set it up.



My client is asking for a reporting tool integration, and I would like to limit the permissions to the gigalixir app’s production database to read-only. Is a separate read-only set of credentials something that is supported

Users on a STANDARD tier database have full admin access to the database. This means anything users can do with a postgres database, they can also do with the provided instance, such as setup roles and limit access accordingly. Configuration



I’m having trouble upgrading our app from Elixir 1.13.0 to Elixir 1.14.2 (Erlang 25.1.2). Could you help us figure out what’s going wrong here

This is a bug in Distillery for OTP 25. Look here. We suspect this may not get fixed, as distillery hasn’t been worked on in a few years. We are recommending users switch over to releases if possible.



If I end up wanting to move to another host, can I get a dump of my database?

You can always pg_dump, and we have some notes on it here



We’ve been developing our app for the past few months and are now ready to put it to production. So I’d like to migrate from a free to a standard tier. However since we’re based in Europe, is it possible to have both the app and the DB running in Europe as well?

Our standard tier databases are available in us-central1 and europe-west1.

If your app is in the europe-west1 region, then the default location of the database, it will be europe-west1.



What is the difference between the free and standard tier with reference to the app itself

The free version is to be used for development and testing apps before going live. The standard version is for production applications that require scaling, clustering, multiple apps, encryption, scalability, and all the other things that are important for production products and services.



Our domain has a Let’s Encrypt cert - is that provided by Gigalixir?

Yes. We can generate your certificate for you. LetsEncrypt is a legitimate certificate provider.



We need to install a cert that is not self-signed for a client’s requirements, so I was going to purchase one from GoDaddy and just wanted to find out how we would go about setting that up on Gigalixir.

If you would like your own certificate installed, we can do that, we have a few customers that do this. We would need to securely get your certificate and key files from you and then we can apply them to your application.

We recommend using GPG for secure file transfer. You can get the signing key from the ubuntu keyserver:

gpg –keyserver keyserver.ubuntu.com –recv-keys 0x6D72EFC6279B30FC

Then encrypt the file with something like this:

gpg –encrypt –armor -r 6D72EFC6279B30FC $FILE

That should generate a $FILE.asc, which you can safely send to us.



How can I push a non-main branch to staging

Our build system only works on master or main. However, this is just what you call the branch to us. So you can push anything to main/master like so:

git push gigalixir staging:main git push gigalixir other-branch:master ```

​Some customers will rename their remotes so they can easily push to one project or the other:

gigalixir create -n my-app-production git remote rename gigalixir production gigalixir create -n my-app-staging git remote rename gigalixir staging

git push staging staging:main git push production main

More info can be found in the git help like “git help push” or “git help remote.”



After upgrading to a paid plan, I still have a free database but the previously free app instance is now being charged.

Was this due to a mistake on my part or is this deliberate?

We understand how this seems like the ‘wrong’ type of upgrade. However, we do not presume to know when/how to upgrade databases to the production level paid tier.

We do not migrate databases because customers usually want more control over the process.
Also it is reasonable for customers to use free tier databases with their standard tier applications. Customers often do this if they are running review applications or for their demo application. Generally staging/production environments will use the paid tier databases so that they are as similar as possible.

We usually recommend using pg_dump and psql to migrate the data:

pg_dump -Fp –no-acl –no-owner –clean

postgresql://{REDACTED}@postgres-free-tier-v2020.gigalixir.com:5432/{DBNAME} > backup.sql

psql postgres://{REDACTED}@{STANDARD TIER IP ADDRESS}:5432/{DBNAME} < backup.sql



Are your standard tier databases provisioned with high availability

They are not default on the STANDARD (paying) tier (as a subset of customers don’t need that level of service), so we offer it as a customization option for those that do require HA.



If we are migrating an app that requires a second database, is the second database included in the automatic backup

Yes. All of our standard tier databases include backups for 7 days.



We rely on the conn.remote_ip in several places on our applications.

On the gigalixirapp.com domain, incoming headers ‘x-forwarded-for’, ‘x-real-ip’, and ‘x-original-forwarded-for’ all contain the original client IP that you might be looking for.



My company is developing an application that uses a Postgres database and a Redis database.

In the Free Tier that you provide, we can only use a Postgress database. Would it be possible to add a Redis database in the paid version?

We can setup a Redis instance but we will currently have to do it manually. We are working to add it to our console and CLI tool so users can self-serve redis instances.

We offer redis instances in the GCP regions of us-central1 and europe-west1. Please find the rates below.

Standalone (single instance) redis instances are available at $75/mo per GB.

High Availability (multi-zonal with automatic failover) instances are available at $120/mo per GB.

You must select an instance sizes that is an increment of 1GB (eg. 1, 2, 3, 4, 99, etc). We offer read-replicas after 5GB, we can provide pricing on this as needed. We can get a redis instance up within 48 hours of you giving us notice, but usually much quicker than that.



What Versions of Phoenix do you Support?

All versions.



What versions of Elixir and OTP do you support?

All versions of Elixir and OTP.

See How do I specify my Elixir, Erlang, Node, NPM, etc versions? Some buildpacks don’t have the bleeding edge versions so those might not work, but they will eventually.



Can I have Multiple Custom Domains?

Yes! Just follow How to Set Up a Custom Domain for each domain.



Do you Support non-Elixir Apps?

Yes, we support any language that has a buildpack. Built-in buildpacks include:



What is Elixir? What is Phoenix?

This is probably best answered by taking a look at the elixir homepage and the phoenix homepage.



How is Gigalixir different from Heroku and Deis Workflow?

For a feature comparison table between Gigalixir and Heroku see, Gigalixir vs Heroku Feature Comparison.. image

Heroku is a really great platform and much of Gigalixir was designed based on their excellent twelve-factor methodology.

Heroku and Gigalixir are similar in that they both try to make deployment and operations as simple as possible.

Elixir applications, however, aren’t very much like most other apps today written in Ruby, Python, Java, etc. Elixir apps are distributed, highly-available, hot-upgradeable, and often use lots of concurrent long-lived connections. Gigalixir made many fundamental design choices that ensure all these things are possible.

For example, Heroku restarts your app every 24 hours regardless of if it is healthy or not. Elixir apps are designed to be long-lived and many use in-memory state so restarting every 24 hours sort of kills that.

Heroku also limits the number of concurrent connections you can have. It also has limits to how long these connections can live. Heroku isolates each instance of your app so they cannot communicate with each other, which prevents node clustering.

Heroku also restricts SSH access to your containers which makes it impossible to do remote consoles, Remote Observers, production tracing, and a bunch of other things. The list goes on, but suffice it to say, running an Elixir app on Heroku forces you to give up a lot of the features that drew you to Elixir in the first place.

Deis Workflow is also really great platform and is very similar to Heroku, except you run it your own infrastructure. Because Deis is open source and runs on Kubernetes, you could make modifications to support node clustering and Remote Observer, but they won’t work out of the box. Even so, you’d still have to spend a lot of time solving problems that Gigalixir has already figured out for you.

For a comparison with some other hosting platforms, check out StakNine’s review of the best hosting providers for Elixir Phoenix.



I thought you weren’t supposed to SSH into Docker containers!

There are a lot of reasons not to SSH into your docker containers, but it is a tradeoff that doesn’t fit that well with Elixir apps.

We need to allow SSH in order to connect a Remote Observer to a production node, drop into a Remote Console. If you don’t need any of these features, then you probably don’t need and probably shouldn’t SSH into your containers, but it is available should you want to.

Just keep in mind that full SSH access to your containers means you have almost complete freedom to do whatever you want including shoot yourself in the foot. Any manual changes you make during an SSH session will also be wiped out if the container restarts itself so use SSH with care.



How do I add Worker Processes?

Heroku and others allow you to specify different types of processes under a single app such as workers that pull work from a queue.

With Elixir, that is rarely needed since you can spawn asynchronous tasks within your application itself. Elixir and OTP provide all the tools you need to do this type of stuff among others. For more information, see Background Jobs in Phoenix.

If you really need to run an Redis-backed queue to process jobs, take a look at Exq, but consider whether you really need Exq.



My git push was rejected

Try force pushing with bash git push -f gigalixir



What happens when an app exceeds the memory limit, even briefly?

When you go over the memory limit on a replica, your pod will get OOMKilled and restarted. Alhtough not instantaneous, the timing is pretty close to it.



What happens when an app exceeds the memory limit for a sustained period of time?

Alhtough not instantaneous, When you go over the memory limit on a replica, your pod will get OOMKilled and restarted.

This will continue until the memory limit is increased for your service.



What happens if an app exceed our CPU limit, even briefly?

CPU cycles are throttled, so should not see your application shutdown directly related to CPU usage. What you will experience is that your app will get slower.



What happens if an app exceeds the CPU limit for a sustained period of time?

CPU cycles are throttled, your app will stay in a slower state for the duration of the exceeded limit.



When we go over our Limits, can we Trigger Alerts/Notifications to our Team?

The errors would show up as an OOMKilled status, which shows up in the logs, allowing you to trigger alerts and notifications.



What Happens when an App Scales Down - Graceful Shutdown?

When scaling down apps (which includes during deploy, the scale down of the old version), a replica is sent the SIGTERM signal.

If your application stops accepting new requests (more below) at this point, then this results in your replica being removed from the load balancer. This means that new requests will not route to the scaling down app. However, any requests that are already on that replica still need to handled by that replica and completed before the next event (SIGKILL).

Then we wait 30 seconds for your app to shutdown. If after 30 seconds, it hasn’t shut down, it is sent SIGKILL and terminated.

If your application doesn’t stop accepting new requests, then you have a race condition for requests around that SIGKILL. This means that you could drop requests. Additionally if you take longer than 30 seconds to respond to requests, then you can also drop requests.

You can test your applications response to this by running a deploy and running requests during the deployment while watching the gigalixir ps command. If the new pod shows HEALTHY status, and your old pod is still responding to requests, then your app is still responding to requests after the SIGTERM.

​This article https://ellispritchard.medium.com/graceful-shutdown-on-kubernetes-with-signals-erlang-otp-20-a22325e8ae98 elaborates the situation and gives some advice on how to gracefully shutdown the pod.



Why was my Account with a Disposible Email Removed from Gigalixir?

We do not allow disposable email accounts in our system.  Any email address flagged as being a disposable email account will be removed.  

​We do not sell email addresses.  In return, we ask that our customers have a valid email address so we can reach you in case there is information about your account/applications that needs to be discussed.