Risolvere i problemi comuni
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Consulta le sezioni seguenti per ricevere assistenza in caso di problemi.
Stato perso in Fleet Engine
Quando lavori con Fleet Engine, progetta l'implementazione in modo da prevedere
gli errori. Ad esempio, se invii una richiesta a Fleet Engine per aggiornare un
veicolo, potrebbe rispondere con un errore che indica che il veicolo non
esiste. L'implementazione dovrebbe quindi ricreare il veicolo nel nuovo stato.
Nello scenario estremamente improbabile di un errore catastrofico di Fleet Engine,
potresti dover ricreare la maggior parte o tutti i veicoli e le attività. Se la velocità di creazione
diventa troppo elevata, alcune richieste potrebbero non riuscire di nuovo a causa di problemi di quota, poiché i controlli della quota
sono in atto per evitare attacchi Denial of Service (DOS). In questo caso, rallenta
la velocità di ricreazione utilizzando una strategia di backoff per i nuovi tentativi.
Nuovi tentativi
Assicurati che il tuo sistema implementi i tentativi per le richieste a Fleet Engine, poiché
potrebbero non riuscire occasionalmente. Le librerie client Fleet Engine eseguono i nuovi tentativi per impostazione predefinita.
Stato perso nell'app per i conducenti
Se l'app per i conducenti si arresta in modo anomalo, deve ricreare lo stato attuale all'interno dell'SDK Driver. L'app deve tentare di ricreare le attività per assicurarsi che esistano
e per ripristinarne gli stati attuali. L'app deve anche ricreare e impostare
in modo esplicito l'elenco delle fermate per l'SDK Driver.
Nota: questi ripristini devono essere eseguiti in autonomia senza fare affidamento su
informazioni di Fleet Engine, ad eccezione degli errori che indicano se e quando un
'entità esiste già nel database. Se un'entità esiste già, l'errore può essere assorbito e l'entità può essere aggiornata utilizzando il suo ID.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-09-05 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 UTC."],[[["\u003cp\u003eFleet Engine implementations should be designed to handle failures and potential data loss by recreating vehicles and tasks when necessary.\u003c/p\u003e\n"],["\u003cp\u003eIn case of Fleet Engine failures, use a backoff strategy to manage the recreation rate and avoid quota issues.\u003c/p\u003e\n"],["\u003cp\u003eImplement retries for Fleet Engine requests to address occasional failures, leveraging client library defaults or custom mechanisms.\u003c/p\u003e\n"],["\u003cp\u003eDriver apps should autonomously restore state after crashes by recreating tasks and stops within the Driver SDK, relying on error handling for existing entities.\u003c/p\u003e\n"]]],["Implement error handling for Fleet Engine failures, such as vehicle non-existence, by recreating entities. In catastrophic failures, recreate vehicles and tasks, using a backoff strategy if quota issues arise. Implement request retries, as provided by Fleet Engine client libraries. If the driver app crashes, autonomously recreate tasks and stop lists within the Driver SDK, relying only on Fleet Engine errors to determine if entities already exist for update purposes.\n"],null,["# Troubleshoot common issues\n\nCheck the following sections for help if you experience any issues.\n\nLost state in Fleet Engine\n--------------------------\n\nWhen working with Fleet Engine, design your implementation to anticipate\nfailures. For example, if you issue a request to Fleet Engine to update a\nvehicle, it might respond with an error indicating that the vehicle does not\nexist. Your implementation should then recreate the vehicle in the new state.\n\nIn the extremely unlikely scenario of a catastrophic failure of Fleet Engine,\nyou may need to recreate most or all vehicles and tasks. If the creation rate\nbecomes too high, some requests may fail again due to quota issues since quota\nchecks are in place to avoid denial of service (DOS) attacks. In this case, slow\ndown the recreation rate using a backoff strategy for reattempts.\n\n### Retries\n\nBe sure your system implements retries for requests to Fleet Engine since they\nmight fail occasionally. Fleet Engine client libraries issue retries by default.\n\nLost state in the driver app\n----------------------------\n\nIf the driver app crashes, the app must recreate the current state within the\nDriver SDK. The app should attempt to recreate tasks to ensure that they exist\nand to restore their current states. The app should also recreate and explicitly\nset the list of stops for the Driver SDK.\n\n**Note**: These restorations must be done autonomously without relying on\ninformation from Fleet Engine, other than errors indicating if and when an\nentity already exists in the database. If an entity does already exist, then\nthat error can be absorbed and the entity can be updated using its ID."]]