title: Restarting the airflow scheduler
body: <p>I'm trying to get airflow working to better orchestrate an etl process. When I make changes to a dag in my dags folder, I often have to restart the scheduler with</p>
  
  <pre><code>airflow scheduler
  </code></pre>
  
  <p>before the changes are visible in the UI. I would like to run the scheduler as a daemon process with </p>
  
  <pre><code>airflow scheduler -D
  </code></pre>
  
  <p>but we I try to do so, I get a message saying </p>
  
  <pre><code>[2018-10-17 14:13:54,769] {jobs.py:580} ERROR - 
  Cannot use more than 1 thread when using sqlite. Setting max_threads to 1
  </code></pre>
  
  <p>I think this error pops up because the scheduler is already running as a daemon. However, when I try to find out where the scheduler is being run with</p>
  
  <pre><code>lsof -i
  </code></pre>
  
  <p>I don't get any results. </p>
  
  <p><strong>Question:</strong> Why am I not able to restart the scheduler with <code>airflow scheduler -D</code>. Why does the scheduler restart with <code>airflow webserver</code>? How do I successfully kill the process that is preventing me to run <code>airflow scheduler -D</code>?</p>