# SQL Error with \`screened\_ip\_addresses\` (API throws 500)

**URL:** https://meta.discourse.org/t/sql-error-with-screened-ip-addresses-api-throws-500/146694
**Category:** Migration
**Tags:** rest-api
**Created:** [3 באפריל,‏ 2020,‏ 12:37pm UTC](https://meta.discourse.org/t/sql-error-with-screened-ip-addresses-api-throws-500/146694 "2020-04-03T12:37:26Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![pnoeric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pnoeric/32/177144_2.png) [@pnoeric](https://meta.discourse.org/u/pnoeric)
#### Post date: [5 באפריל,‏ 2020,‏ 5:55pm UTC](https://meta.discourse.org/t/sql-error-with-screened-ip-addresses-api-throws-500/146694/11 "2020-04-05T17:55:42Z")

</div>

> [@blake](#):
>
> Can you describe how your Discourse instance is setup? Is it from an import? Are you on the latest version? How much ram does it have? Did you follow [this guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)?

Sure – it’s completely Docker, on Digital Ocean. I followed that excellent guide to the T.

> [@blake](#):
>
> Can you check this site setting: `max new accounts per registration ip` ? I’m not sure it matters in this case but perhaps it is causing an issue.

Sure, I just changed that setting from default 3 to 99999. No different, still getting the 500 error.

> [@blake](#):
>
> In your bulk script could you slow it down and have a 1 sec pause between requests and see if that makes a difference?

Tried that, no difference. Note that I still get the 500 error with ONE “bad” account, through Insomnia. So at this point, it’s like that one account is poisoned, and even if I just make the one “create message” API call with it (none before or after), I still get the 500 error. But yes, my import script is getting the 500 also 😉

> [@blake](#):
>
> What is the purpose of these api calls? If it is a one time script to build import users and posts then perhaps an import script that runs on the actual server that doesn’t make api calls would be better?

Yes, I’m an experienced coder but don’t know RoR/Ruby at all, so I can’t really use the off-the-shelf options that y’all provide, though I recognize they are likely superior to me manually walking my existing forums and creating users, etc on the fly via API. Thus [my marketplace post](https://meta.discourse.org/t/paid-migrate-proprietary-forums-to-discourse/146890)… I would love to get this all working for myself but I also have a hard deadline 😉

> [@blake](#):
>
> Sorry for all the questions, but we haven’t run into this issue before and the code around screened\_ip\_addresses hasn’t been updated in a long while. I’m not saying we don’t have a bug in the code base somewhere, but after having a quick look nothing is standing out at the moment.

Totally get it, and I appreciate your attention to this.

So here’s something that I can offer which might help a lot: since it’s an off-the-shelf installation, and I haven’t done much of any customizing, AND the bug is easily reproducible without my code (just use Insomnia) AND I haven’t launched the forums, I could pass you the root login for the Digital Ocean instance, my API key etc., and I have no problem with you mucking around in there. My Discourse forums are currently a ton of empty categories and a few other special intro messages we’ve set up, but it’s basically empty and no real users are in there yet (just admins). So it would be fine if you want to test things, create/erase topics and messages, etc.

This would definitely be the fastest way to see the bug first-hand for yourself. And then since you would be in there as root, you can also muck with whatever low-level Discourse things you want, to find out why this is happening.

E

---

_[View the full topic](https://meta.discourse.org/t/sql-error-with-screened-ip-addresses-api-throws-500/146694)._
