MemoryError when querying database from Process
Possibly related to https://github.com/ghaering/pysqlite/issues/110 If you're iterating over a large result set, peewee caches rows in-memory (to make subsequent iterations/indexing operations fast). In the case of a single-shot iteration over a lot of rows, though, this can OOM you.

To fix, just make this change to the problematic line of code:

```python
while True:
    # Note we add ".iterator()"
    for row in FileModel.select().iterator():
        ...
```

Please read:

http://docs.peewee-orm.com/en/latest/peewee/querying.html#iterating-over-lots-of-rows This happens for an empty database too. then I highly doubt the issue is in Peewee.
I am trying to create a program with 3 processes that read from the same database. The code was working before I started introducing processes.

I am getting MemoryError when performing a `select()`. I suspect there is something wrong with sharing of resources:

**models.py**

```python
from playhouse.pool import PooledSqliteExtDatabase

file_scanner_database = PooledSqliteExtDatabase(
    None,
    max_connections=32,
)

class FileModel(Model):
    class Meta:
        database = file_scanner_database
```


**main.py**

```python
from file_scanner import FileScanner
from models import file_scanner_database
from models import FileModel
from multiprocessing import Process

def create_scanner_agent(data):
    scanner = FileScanner(data)
    scanner.start_scanner()

shared_info = {'db_location': '/absolute/path/to/database'}

file_scanner_database.init(shared_info['db_location'])
file_scanner_database.connect()
file_scanner_database.create_tables([FileModel], safe=True)

new_process = Process(
    target=create_scanner_agent,
    args=(shared_info,)
)
new_process.daemon = True
new_process.start()

try:
    new_process.join()
except KeyboardInterrupt:
    pass

new_process.terminate()
```

**file_scanner.py**

```python
from models import file_scanner_database
from models import FileModel

class FileScanner:
    def __init__(self, data):
        for k, v in data.items():
            setattr(self, k, v)

        file_scanner_database.init(self.db_location)
        file_scanner_database.connect()

    def start_scanner(self):
        while True:
            # THIS IS WHERE THE PROGRAM CRASHES
            for row in FileModel.select():
                ...
```

If I use `Thread` instead it seems to work.