XLoader troubleshooting starts with why a resource never reaches the DataStore
Most failed or stalled XLoader jobs sit in seven places: the job worker, the DataStore plugin and permissions, the API token, file size, job timeouts, SSL verification, and type or hash settings. When a file is uploaded or linked but the DataStore view stays empty and the job shows failed or pending, work through these in order of the cheapest check first, starting with the worker. Confirm which loader the portal runs before anything else. XLoader is the officially supported tool for loading uploaded or linked files into the CKAN DataStore, while DataPusher is now legacy, so a portal still wired to DataPusher should plan a move before debugging it. Confirm that the DataStore plugin is enabled in ckan.plugins and that the loader is the one you intended.
XLoader keeps its job results in a separate database, which defaults to SQLite. That default suits a single test host, but PostgreSQL is recommended for production, so settle this before go-live. Next, confirm that a ckan jobs worker process is running on a host that can reach both CKAN and the job results database. A job that stays pending usually means nothing is consuming the queue, so compare the queued job IDs with the worker log. Then verify the DataStore permissions. A loader without the access it needs will fail, and the error text, not the status alone, tells you which setting to fix. The ckanext-xloader repository documents each option and its default, so check your installed version against it.
Record the resource ID, the job ID and the exact error text before changing any setting, because several failure types look alike from the outside. A pending job points at the worker or the queue. A failure that names authorization points at the API token. A file rejected for size points at the file limit, and a job that ends partway through a large file points at timeouts. Treat each category as one decision: change the setting that matches the error, rerun one resource, and confirm the rows appear in the DataStore view before moving on. Changing several settings at once makes the next failure hard to attribute to a cause.
How a resource load moves from upload to DataStore and where it breaks
The diagram follows one resource from upload to the DataStore. A user adds a resource, and CKAN queues an XLoader job that a ckan jobs worker picks up. The worker downloads the file with the API token over HTTP or HTTPS, and SSL verification is on by default. Unchanged files can be skipped by hash. When type guessing is enabled, types are guessed and checked before rows are written to the DataStore PostgreSQL database, and the job status is then recorded in the job results database. The failure points branch off the main path: no worker running, a rejected token, a file over the size limit, a timeout, an SSL error and a strict type refusal. When a resource never reaches the DataStore, check each branch against the job status and the worker logs.
The upload-to-DataStore path, with the failure points that stop a load.
Which XLoader settings to check first when a load fails
This table compares the five XLoader settings most often behind a failed, skipped or incomplete load, with the default for each. Read the symptom column first, then check whether the default fits your files and portal, and change one setting at a time. Confirm the full configuration key names in the ckanext-xloader repository for your version before you edit the config file.
| Setting and default | Symptom it touches | When a change fits | Trade-off |
|---|---|---|---|
| ckanext.xloader.use_type_guessing (False) | Columns load as text, so numeric and date filters and sorting behave as strings | When consumers need typed columns and you will check the results after the load | Inferred types change how values are stored, so review the table after reload |
| strict_type_guessing (True) | Load fails when one cell in a column does not parse as the inferred type | When a column is clean except for a few bad cells and you have checked the source file | Looser checking can let bad values reach the DataStore, so inspect the loaded rows |
| max_excerpt_lines (0) | Oversized files are not loaded, so the resource never appears in the DataStore | When you deliberately want a partial load, after confirming how your version handles it | A partial table can look complete, so label it clearly for users |
| ignore_hash (False) | Unchanged files are skipped, so a reload after a fix does nothing | When you must force a reload of the same file after a failed job or a configuration change | Each forced reload reprocesses the whole file and uses worker time and job timeout budget |
| ssl_verify (True) | Fetching a linked resource fails with a certificate verification error | Only for a known internal host with a private certificate, until its CA is trusted by the worker | Disabling verification removes protection against a spoofed source during fetch |
Six XLoader failure patterns and where to look first
Most XLoader failures fall into a small set of patterns, and each one leaves a different trace in the resource status, the worker log or the configuration. Use the symptom to pick a starting point, then confirm the cause in your own logs and config files before changing settings. Values for limits and timeouts live in your environment, so read them directly from your deployment.
No worker or DataStore setup
The resource sits in a pending state and no job ever starts. XLoader needs a running CKAN job worker started with ckan jobs worker, the DataStore plugin enabled and DataStore permissions in place. Check the worker process first. Confirm it is running with the same configuration file your web servers use, then confirm the plugins are listed in your config and the permissions were set. The fix is usually a supervised worker restart or a corrected plugin list.
API token errors
The job fails with an authorization error when it calls back to CKAN. Since CKAN 2.10, XLoader authenticates with an API token, so an expired, revoked or mistyped token stops every load. Check the token in the worker configuration first. Confirm it belongs to an account that can edit the dataset, that it has not been revoked and that the worker reads the same site address as your CKAN instance. Fix it by issuing a new token for a service account, updating the configuration and restarting the worker.
Files over the size limit
The file is larger than the size limit configured for XLoader, so the resource never reaches the DataStore. The max_excerpt_lines setting defaults to 0, and at that default oversized files are not loaded. Compare the file size with the limit in your own configuration. Check the worker log for the error the failed job recorded, and confirm the worker loaded the configuration you edited. The fix is either a higher limit that your worker hosts can handle, or splitting the file into smaller resources.
Job timeouts on large files
The job runs for a long time, then stops before the table is complete, and the worker log shows where the run ended. A timeout usually reflects how long a large file takes against the configured job limit. Compare the run time with the job timeout in your configuration. Note the file size, the row count reached and the point where the log stops, then check the timeout value the worker reads. The fix is a longer timeout sized from measured runs, a split file, or a dedicated worker host for large loads.
SSL verification failures on the host
The job fails while fetching the file with a certificate verification error, even though the link opens in a browser. XLoader verifies certificates by default, because ssl_verify defaults to True. Test the download from the worker host itself. Browsers can fetch missing intermediate certificates, so a link that works on your desktop can still fail on the worker. The usual fix is to add the internal certificate authority to the worker's trust store or to complete the chain on the file host. Setting ssl_verify to False is only a short diagnostic step, and it should be recorded and reversed.
Strict type guessing refuses a column
XLoader refuses to apply the type it guessed for a column because one cell does not parse as that type. strict_type_guessing defaults to True, which makes any single failing cell enough to refuse the type. Find the failing value in the worker log, if the log names it. Also check use_type_guessing, which defaults to False, so you know whether guessing was active at all. Fix the source values and reload, or set a type override in the CKAN Data Dictionary after reviewing the data. Relaxing strict_type_guessing is a decision about mixed values and belongs in a documented, per-dataset review.
XLoader repositorySet up the checks that confirm a resource can load
This sequence checks each dependency XLoader needs, from the DataStore plugin and a running job worker to the API token and results database, before any file is blamed. It ends with a small test file that loads cleanly and a record of which failure pattern explains each observed error. Work through the steps in order, because later checks depend on earlier ones.
Confirm the DataStore plugin and permissions
The CKAN site administrator confirms that the DataStore plugin is enabled in the site configuration and that the DataStore database users and permissions match the DataStore setup your team completed. If permissions have drifted, reapply them with the ckan datastore set-permissions command described in the DataStore setup topic. XLoader cannot write to a DataStore that is not configured, so this check comes first. Done when a Data API query against an existing DataStore resource returns rows without an error.
Start a job worker and confirm pickup
Run
ckan jobs workeron a host that reads the same CKAN configuration file as the web application, and keep it running under a process supervisor so it restarts after a failure. XLoader queues its work as CKAN jobs, so a resource with no running worker stays pending without an obvious error message. Submit a test resource to XLoader and watch the worker output. Done when the worker log shows the job picked up and the resource status moves past pending.Verify the API token used for loading
Confirm that the API token XLoader uses belongs to a user who can edit the dataset and resource being loaded, and that the token has not expired or been revoked. For a private dataset, the user's organization role must also allow access to it. From the worker host, make an authenticated Data API call for that private resource using the same token. Done when the call returns the resource metadata, with no authorization error in the response.
Check the job results database and PostgreSQL
XLoader writes job results to its own database. The default is SQLite, and PostgreSQL is recommended for production, so confirm that the results database setting points to PostgreSQL on any production site. Check that the worker host can reach that database and that the account it uses can create and write tables there. Done when a test job appears as a record in that database and its status can be read back.
Reproduce with one small test file
Create a small CSV with a header row, consistent values in each column and a plain text encoding, then load it as a new resource in a test dataset. A small, clean file separates environment faults from data faults. Done when the resource reaches a loaded state and a datastore_search query returns the expected rows. If this fails, return to the earlier checks before testing anything larger.
Reproduce with one file near the size limit
Before testing, confirm the configured max_content_length and the ckanext.xloader.max_excerpt_lines value, because the excerpt default of 0 means oversized files are not loaded. Then load a file close to the size limit, using the same column layout as the small file. Done when the file either loads in full or fails with a size or timeout message, which shows whether file size is the cause.
Read job status and map the error
Read the job status on the resource and the matching worker log entry, then match the message to one failure pattern. Patterns include no worker picking up jobs, an API token that is rejected, a file over max_content_length, a job that times out, an SSL verification failure under ssl_verify, a column refused under strict_type_guessing, and a file skipped by hash checks controlled by ignore_hash. Change one setting at a time and rerun the small file. Done when each failure has a named cause and the small file loads cleanly again.
Hash skipping and type guessing: when to change the setting for one resource
A resource that reports success but shows old rows usually means XLoader skipped the load. The ignore_hash setting defaults to False, so XLoader compares the file's hash with the one from the last load and skips the reload when they match. That behavior avoids reloading identical content. Set ignore_hash to True only after you have confirmed that the file content changed at the source. If the hash matches, the file probably did not change, and forcing a reload will not fix stale data caused elsewhere.
- Check the source first: download the file from the exact URL XLoader reads and compare its content or checksum with the last load.
- Rule out caching: a CDN or proxy may return an old copy, and a forced reload cannot correct that.
- Understand the scope:
ignore_hashis set in the CKAN config file, so it affects every resource loaded while it is on. Confirm how your deployment limits it to one resource, or change it briefly and revert. - Reload step: after editing the config, restart the CKAN processes that read it, then resubmit the resource to XLoader from the resource page. Confirm the resubmit route for your CKAN version in the ckanext-xloader repository.
After the reload, set ignore_hash back to False and confirm the row count and sample values in the DataStore match the new file.
The strict_type_guessing setting defaults to True, which refuses to assign a type to a column if any cell fails to parse. On a messy file, one stray text value in a numeric column can cause that column to be rejected or loaded with an unexpected type. Relaxing the setting lets the column load with a type that fits most values, so you trade strictness for loaded types. Separately, use_type_guessing defaults to False, and enabling it changes how types are inferred on every later reload.
- Find the bad cells: locate values that break the column's apparent type, such as a dash in a numeric column or dates written in mixed formats.
- Fix the source when you can: a corrected file keeps the strict default and keeps column types predictable.
- Relax strictness for one load: set
strict_type_guessingto False only for known and accepted messy values, and record that decision. - Test type guessing on a copy: enabling
use_type_guessingaffects future reloads of other resources too, so review the resulting column types before you apply it widely. - Reload step: change the config, restart the CKAN processes, then resubmit the resource to XLoader. Compare the column types in the DataStore with what consumers expect.
Before you publish, check each column type against a sample of the file and against the queries your consumers run.
The max_excerpt_lines setting defaults to 0, so oversized files are not loaded. If a small file loads and a large one never reaches the DataStore, the size limit is the likely cause and the worker is probably working correctly. Raising the value lets XLoader accept larger files, which means longer jobs, more DataStore rows, and more database storage and worker memory. Before you raise it, verify in the ckanext-xloader repository exactly what the value counts, because the name alone does not settle whether it limits lines loaded or lines in the file.
- Confirm the failure: check the job status and worker logs to see whether the job was skipped for size or failed later, for example on a timeout.
- Estimate the load: count the lines and columns in the file and estimate the table size in your database before you change the limit.
- Plan for longer jobs: a larger file can exceed job timeouts, so review the worker timeout settings against the file size.
- Choose a value by test: on a staging portal, set a value just above the file's line count, reload the file, and measure duration and storage.
- Reload step: change the config, restart the CKAN processes and job workers, then resubmit the resource to XLoader. Reset the value afterward if other large files should stay blocked.
Once the load completes, compare the DataStore row count with the line count of the source file.
When XLoader cannot download a file from an internal host, the most common cause is an incomplete certificate chain. The server may present its own certificate without the intermediate authority that signed it, or the internal authority may be missing from the trust store used by the CKAN and worker hosts. The ssl_verify setting defaults to True. Turning it off lets downloads proceed without checking who serves the file, which removes the protection verification gives against a substituted host, so treat it as the last option.
- Test the chain: from the CKAN host, check that the file host presents the full chain and that it validates against your internal root.
- Install the missing authority: add the internal root or intermediate certificate to the trust store on every host that runs XLoader, including separate worker hosts.
- Restart and retest: restart the processes so they load the updated trust store, then resubmit one small resource.
- Use an exception only if documented: if the host cannot be fixed in time, set
ssl_verifyto False for a limited period, record the risk and an owner, and set it back. - Reload step: after the chain is fixed, resubmit the resource to XLoader from the resource page and confirm the job completes with verification enabled.
Confirm the job succeeds with ssl_verify at its default before you close the issue.
Why timeouts and file size limits depend on your deployment
The supplied sources do not give default timeout or file size values for XLoader, so do not treat any number you find elsewhere as the limit for your portal. Confirm the actual values in your CKAN version, your web server configuration and the configuration of the process that runs XLoader jobs. The limit that stops your file is often set in a layer you did not expect, such as a proxy in front of the web server or a process manager that restarts workers. Check max_content_length in CKAN, and review max_excerpt_lines in the XLoader settings, because its default of 0 means oversized files are not loaded at all. The ckanext-xloader repository lists every option with its default.
A large file can exceed a timeout in more than one place. The job worker has to fetch the file, parse it and write rows into the DataStore, and each stage can hit a limit that was set for a web request or a background job. The web process that accepts the request that starts loading can time out on its own, so the resource may look stuck in the portal while the worker is still writing rows. Before you change any setting, check the worker logs and the row count in the DataStore table, then load a smaller sample of the same file. That separates a parsing failure from a timing failure and shows you which limit to confirm first.
The worker host's memory and disk matter because the worker has to hold the downloaded file and parse it. Confirm how much free disk the worker has for the largest file you expect to load, and how much memory the parser needs at that size. Moving workers to a separate host changes where these limits apply. The timeout and disk settings you tested on the web server no longer govern the worker, and the worker host needs its own CKAN install, config file, Redis and database access. Work out worker sizing and job timeouts in the sibling topic on running XLoader workers on a separate server before you set values for either host.
Security risks in SSL and API token fixes
The fastest ways to clear an XLoader failure, such as turning off certificate checks or reusing a broad API token, each widen what an attacker can reach or change. The four cards below cover the risks to review before you close a troubleshooting ticket, whether the job runs on the web server or a separate worker.
Certificate verification on the download path
Setting ckanext.xloader.ssl_verify to False stops XLoader from checking who served the file, so anyone who can sit on the network path between the worker and the source host could replace the data before it is loaded. Restore a valid certificate chain first, including any internal or intermediate authority the source uses, and confirm the worker trusts it by fetching the file from the worker host itself. Also confirm which hosts and ports the worker can reach, because a broad outbound rule can expose an untrusted path you did not intend to open.
Scope the XLoader API token
The API token XLoader uses to write to the DataStore acts as a CKAN user, so every right that user holds is available to anyone who obtains the token from the worker configuration. Give that account only the permissions loading needs, and do not make it a sysadmin for convenience. Rotate the token after troubleshooting, even if you only pasted it into a ticket or a shell session. Confirm where your CKAN version stores the token and who can read that location, because the answer decides which hosts and roles need protection.
Job results and worker logs
The job results database and the worker logs record what XLoader fetched and why a job failed, so they can contain file URLs with query strings, credentials passed inside links, and raw error text that quotes cell values from the dataset. Treat both as sensitive data and restrict read access to named operators who run the portal. Before you share a log excerpt in a support thread, remove URLs and quoted values. Check where your deployment writes logs and who can reach the database, especially if the default SQLite file sits on a shared host.
Separate write and read credentials
XLoader writes rows through the DataStore write user, while the Data API serves public queries through the read-only user. Keep these two credentials separate so that a leaked read connection cannot write and a loader problem does not expose write access to the public API. Do not reuse one connection URL for the worker and the portal, and do not grant the read-only user write rights to clear a load error. After any change, test that the read-only user is refused on an insert and that public queries still return rows.
XLoader troubleshooting questions teams ask before hiring help
What drives the cost of an outside XLoader fix?
The cost follows how much diagnosis and change the fix needs, and four factors set most of it. The first is the number of failing resources, since each one has to be traced to its cause and rechecked after the fix. The second is access to the server and worker logs, because without them the work starts with guesswork and takes longer. The third is the number of worker hosts involved, which adds configuration and queue checks on each machine. The fourth is whether type or encoding problems in the source files are involved, since malformed cells or unexpected character sets need data work as well as configuration changes. Your team pays its own staff to provide access, logs and a change window. Ask any provider for a quote that prices these four factors separately and lists the work each one includes.
How long does an XLoader fix take?
It depends on the cause of the failure and on how quickly the team can grant access. A missing job worker or an invalid API token is usually a configuration change. Files over the size limit, job timeouts and type failures need a closer look at the file and the job settings, which takes more time. Access to logs and an agreed change window decide how soon testing can start. DeployOpen does not give a duration before the cause is known. The timeline is confirmed in the written scope before work starts, and it names the resources in scope, the checks run after each change and who approves the retest. If a provider gives a fixed duration before reviewing the logs, ask what that estimate is based on.
What does a troubleshooting engagement need from our team?
Plan to provide five things. The first is CKAN administrator access, or an administrator who can run the checks and make the changes while the provider observes on a call. The second is the job and web server logs covering the failed runs, including the worker logs. The third is the configuration files that hold the ckanext.xloader settings and the DataStore connection details, with secrets removed. The fourth is a sample file for each failing resource, along with one that loads successfully if you have one. The fifth is a change window in which the job worker can be restarted and configuration updated without disrupting the portal. Share credentials through your approved secret channel and keep a record of every change made during the work.
Can our own team troubleshoot XLoader jobs without an outside provider?
Yes. A team can diagnose many XLoader failures itself if one person is comfortable with CKAN configuration and server logs and can restart the CKAN job worker. Start with the setup checks on this page. Confirm that a job worker is running, that the DataStore plugin and permissions are in place, that the API token is valid, and that the job results database suits your environment. Then compare the file size limit, the job timeout, SSL verification and the type guessing settings against the failing resource. The ckanext-xloader repository documents these options. Outside help is most useful when the logs are unclear, many resources fail in different ways, or the fix touches source files or the server layout.
Does reloading an XLoader resource fix column types?
It depends on the type settings in place and on any Data Dictionary overrides. By default, ckanext.xloader.use_type_guessing is False, so XLoader does not infer types from the data and columns can load as text. With strict_type_guessing at its default of True, a column is refused a type if any cell fails to parse, so one bad value can keep an otherwise clean column untyped. If you set type overrides in the Data Dictionary, XLoader applies them on reload when columns were loaded as text. Before reloading, check the configuration, the Data Dictionary and a sample of the cells in the columns that matter. A reload with the same settings and the same cells will usually produce the same result.
Is a fixed-scope engagement or a retainer better for ongoing loading problems?
A fixed-scope engagement suits a defined problem, such as a set of failing resources, a worker move or a change of loader, with deliverables and timelines agreed in writing before work starts. A retainer suits recurring problems, such as new resources that fail every cycle, regular upgrades of the CKAN and XLoader stack, or ongoing checks on timeouts and file sizes as the catalog grows. If the failures trace back to one cause, a fixed scope often resolves it. If they come from data that keeps changing, a retainer keeps someone responsible for it over time. Compare the quote for each option against the work it covers, and ask what happens when a new failure appears outside the agreed scope.
Limits to confirm in your CKAN and XLoader versions
Before you change a setting or retry a load, confirm the limits that apply to your CKAN and XLoader versions. The cards below list each item to verify and the team that can confirm it. Check each answer against the ckanext-xloader code for your release and record it in your runbook.
Timeout and file size limits
Large resources fail at the job timeout or at the file size ceiling, and the names and defaults of those limits depend on your CKAN and XLoader versions. Confirm that your deployment actually applies the job timeout and max_content_length, plus whether max_excerpt_lines is set above its default of 0, which stops oversized files from loading. Your platform team can read these values from the live configuration files and the worker logs, then compare them against the release notes for the version you run.
Job results database
XLoader stores its job results in a database that defaults to SQLite, while the ckanext-xloader repository recommends PostgreSQL for production. Confirm whether production uses PostgreSQL, and check that the web servers and every job worker use the same connection. Your DBA or CKAN administrator can confirm the setting and whether the database is covered by your backup schedule. Write the answer down, because the SQLite default applies when nothing else is set.
XLoader repositoryAPI token and its location
XLoader needs an API token from CKAN 2.10 onward. Confirm which account owns the token, that the account can write to the DataStore for the datasets it loads, and where your version reads the token. Your CKAN sysadmin can check the account in the user list and the configuration on the web and worker hosts. Record who rotates the token and how, so a rotation does not cause authorization errors in the next job.
XLoader setting names and defaults
The ckanext.xloader options that change loading behavior each have a default, and those defaults are the first thing to verify. Confirm the current names and defaults for use_type_guessing, which is off by default, and strict_type_guessing, which is on by default and refuses a column type if any cell fails to parse. Also confirm ignore_hash, which is off by default, and ssl_verify, which is on by default. Read these in the ckanext-xloader repository for your release before you copy a setting from older notes. Your CKAN developer or platform engineer can confirm them.
XLoader repositoryDataPusher legacy status
XLoader is the officially supported loader for the DataStore, and DataPusher is now legacy. Confirm that no portal resource still depends on DataPusher, that no DataPusher setting remains in your configuration, and that each resource you expect in the DataStore was loaded by XLoader and not by a leftover job. Your CKAN administrator can check the plugin list and the job queue. Record the result, so a failed load is traced to the loader that actually ran it.
DataStore docsWorker memory and disk
Large downloads are fetched to the job worker before loading, so the memory and free disk on that host limit how big a file can be. Measure the peak memory and temporary disk use on a file close to your largest resource, and confirm free space on each worker host. Check whether the worker shares its host with web services, since both compete for the same memory and disk. Your infrastructure team can run this test and record the results against your largest resource.
How DeployOpen scopes and supports XLoader fixes
DeployOpen approaches XLoader failures by reproducing the failed job in your own CKAN environment, then tracing it through the job worker, API token, file size limit, timeout, SSL and type-guessing settings. Fixes are agreed in writing before work starts, and each change is documented so your team can run and repeat it. Most engagements are fixed-scope, and ongoing support is available as a retainer.
How we scope
- The written scope lists which failing resources, CKAN hosts and XLoader settings are in play.
- We confirm the job worker, DataStore plugin and DataStore permissions are in place before any tuning starts.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing, and ongoing support available as a retainer.
How we build
- We trace each failure to its cause: missing worker, token error, size limit, timeout, SSL verification or type guessing.
- Settings such as ssl_verify, max_excerpt_lines and strict_type_guessing are changed one at a time and recorded.
- Changes to ignore_hash are reviewed carefully, since hash-based skipping can hide a resource that has not reloaded.
How we hand over
- A runbook covers the worker start command, the configuration keys changed and how to rerun a failed load.
- Your team receives the diagnosis notes, the final settings and a test plan that reloads representative resources.
- Handover includes a check of the job results database, with PostgreSQL planned for production where SQLite is the default.
How we support
- Retainers can cover upgrades, continuous testing and reviews when XLoader settings or CKAN versions change.
- Ask whether support covers worker monitoring, log review and reruns for large files on a separate worker host.
- Confirm response expectations and escalation paths in the written scope before work starts.

